Reputation: 1014
I'm trying to clone or push to an empty repository on our Gitlab server using SSH authentication but whenever I try I am asked for the git password (using Git Bash):
myname@PC0016 MINGW64 /c/users/myname/dev
$ git clone [email protected]:android/myApp.git
Cloning into 'myApp'...
[email protected]'s password:
I have tried my password and the Git password given to me by an admin but I get:
Please make sure you have the correct access rights
and the repository exists.
Why do I need to supply this password when I have added my SSH key to the project file in Gitlab? What am I missing? Thanks!
Upvotes: 1
Views: 1340
Reputation: 521
You need an ssh key to skip the authentication phase. Usually the operation that I perform are:
If you properly set the key everything will be fine.
Upvotes: 0
Reputation: 25946
Create a ssh_config`, where you will point your client to your identity file:
Host git.repo.local
IdentityFile C:\Users\myname\.ssh\id_rsa
Also store this file in the /z/.ssh/config
to be read by your client.
Upvotes: 1