Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git clone asking for password (multiple users)

Tags:

git

ssh

I have setup a VM with multiple users. My primary users is VM-User and using that account I created another user called "Joe". I have cloned a git repo by loggin into the VM-User and everything works fine.

The problem I'm having is when I try to clone the same repo by loggin into the user "Joe" it asks me for a password for the git server.

git clone [email protected]:repo.git some_folder

its shows:

[email protected]'s password: (asks me to type in a password)

I have created an ssh key for "Joe" and added it to gitosis.

Does anyone know what I'm doing wrong?

Thanks in advance :)

SSH Debug Log:

debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: [email protected]
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/joe/.ssh/id_rsa
debug1: Trying private key: /home/joe/.ssh/id_dsa
debug1: Trying private key: /home/joe/.ssh/id_ecdsa
debug1: Next authentication method: password
like image 738
Farhan Ahmad Avatar asked Jul 25 '26 01:07

Farhan Ahmad


1 Answers

You don't have an authorized key set up on the cloning machine, otherwise SSH would never get to this step:

 debug1: Next authentication method: password 

I would check that I have the correct key(s) on the VM and the cloning machine.

like image 71
Mark Leighton Fisher Avatar answered Jul 27 '26 17:07

Mark Leighton Fisher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!