I've setted up a git private server on my desktop pc (OS ubuntu 21.04), and I whant to be able to work on those repos with my laptop or my desktop pc
- Already created
gituser (root,my_user,git)
ssh-serverservice on
ssh rsa keysgenerated (laptop and desktop)
ssh/authorized_keysconfigurated
- Able to access via
sshfrom my laptop
- Able to access via
sshfrom my desktop to my destkop withmy_user
- Able to
git pushfrom my laptop
But I have problems trying to git clone those repos on my destop pc
$ git clone git@Desktop:/home/git/repo.git
git@Desktop's password:
Instead of asking my password it ask the pasword for git user
Make sure to add
id_rsa.pubto/home/git/.ssh/authorized_keysI found out that I mistakenly add my
id_rsa.pubfrommy_userto the wrong.ssh/authorized_keysfile by running cat comand./home/git/.ssh/authorized_keys/home/my_user/.ssh/authorized_keysI just have to add the missing key and it worked like a charm