0

I have set-up a repository at a Gitlab cloud server (linux-based). I created a new repo there following the basic instructions.

git@code.example.com:mike/repo.git

I add the repo as a remote to my local git

git remote add gitlab git@code.example.com:mike/repo.git

I have generated a (pk, sk) key-pair using Puttygen on a windows machine. I add these in Users/mike/.ssh as id_rsa follwing the instructions from

https://serverfault.com/questions/194567/how-do-i-tell-git-for-windows-where-to-find-my-private-rsa-key

Furthermore, I add the public key under DeployKeys for the repository in Gitlab.

Unfortunately, when I try (in Git bash)

git push -u gitlab master

it stills asks for my git user password git@code.example.com:mike/repo.git's password?

when I try

ssh -v git@code.example.com:mike/repo.git

it comes back with ssh: Could not resolve hostname code.example.com:mike/repo.git: no address associated with name

Not clear what I am missing. Any thoughts?

Cheers, Mike

Community
  • 1
  • 1
Mike
  • 3,775
  • 8
  • 39
  • 79
  • In your bash session, do you see your keys when you do a ls $HOME/.ssh? – VonC Sep 11 '15 at 09:11
  • Yes, I see id_rsa (secure key) in my .ssh. Not my public key – Mike Sep 11 '15 at 21:34
  • Well, you need both (private and public keys) in there. – VonC Sep 11 '15 at 21:34
  • I followed http://stackoverflow.com/questions/2224066/how-to-convert-ssh-keypairs-generated-using-puttygenwindows-into-key-pairs-use to create the public key, but still asks for my password... – Mike Sep 11 '15 at 21:49

1 Answers1

0
  1. Go to the User Profile
  2. Click ssh keys on the left menu
  3. Add your ssh key

Add SSH key

GUISSOUMA Issam
  • 2,572
  • 2
  • 16
  • 27
  • I tried this, but still asks for my password. I also tried to add it to my project via Deploy keys. However, then it complains about already existing key. I don't seem to be able to have the same key enabled at my profile and for he project – Mike Sep 11 '15 at 21:43
  • Try to store your credentials `git config credential.helper store` – GUISSOUMA Issam Sep 12 '15 at 16:37
  • No luck. It is likely a general ssh problem. I also cannot ssh -v localhost (leading to connection refused). – Mike Sep 12 '15 at 21:40