2
votes

I'm using ubuntu linux 11.10. Generated private key following these steps.

Now I want to use same key on windows which has msysgit installed.

Tried copying "~/.ssh/id_rsa" to "C:/Users/user_name/.ssh/id_rsa", but that didn't help.

Where to go next?

2
Did you copy the corresponding id_rsa.pub as well? - Fred Foo

2 Answers

1
votes

First check if you have .pub there also. If you do and keep on having issues, this is how I've done something similar:

  1. > $GIT_PATH\bin\ssh-agent (it should be in the bin folder of your git installation, if you chose correctly when installing msysgit)
  2. > $GIT_PATH\bin\ssh-add "%USERPROFILE%\.ssh\id_rsa" (should say key was successfully added)

and retest. If ssh-add says it couldn't contact ssh agent, try setting the environment variables that running ssh-agent outputted (it should've outputted something like "SSH_AUTH_SOCK=something", so set that with "set SSH_AUTH_SOCK=something") and retry.

0
votes

My ssh-add says that it couldn't contact ssh agent. Yet, I can git over ssh without the annoying password request. This is because id_rsa is captured automatically. I can add other rsa/dsa files as IdentityFile fileds in ~HOME/.ssh/config file.