The problem: When I try to use a ssh2-RSA key generated by puttygen with the command line git tool the key is rejected.
Details: I have TortoiseGit installed on my computer (as well as msysgit). TortoiseGit is set to use PuttyGen to generate it’s keys. When I try to use one of the keys generated by PuttyGen in the command line git tool it denies the public key and in some cases will ask for a password even though the key has none. I have had this issue on multiple computers (all running windows 7 x64) any idea of how to get around this so i don’t have to have separate keys for my cmd line client and TortoiseGit?
It may also be of interest that TortoiseGit is set to autoload a putty key for each repo form the push dialog. When i run ssh -v git@github.com it finds the key correctly but when it trys to connect it is rejected saying the key is wrong. If i use a key made by ssh-keygen it works just fine.
Software Versions:
MsysGit 1.7.7.1
SSH 4.6p1
PuttyGen 0.61
Tortise 1.7.5.0
Thanks for your help (and if this is the wrong exchange to be putting this on please tell me so i can close and move it quickly)
Eric Fode
Duplicate of this one. In short: PuTTY (which
puttygenis a part of) and OpenSSH (whichssh-keygenis a part of) use different format to store its keys, and you have to either stick to one of them or perform conversions.Personally, I have set up Git to use
plink.exeas its SSH agent and feed it keys via thepageantprogram which is PuTTY’sssh-agent.To make it maybe more clear: Git for Windows bundles OpenSSH but it’s not tied to it and can happily use PuTTY if told to do so. Everyone can pick their choice here. I think that if PuTTY is installed in the system or used by some other tool (looks like your case) making Git use PuTTY is a natural choice then.