I installed git for windows and when presented with the option to pick Putty or OpenSSH, I opted for OpenSSH. However, I do have putty installed, and it appears that git caught on to this and is trying to use it. (I have GIT_TRACE=2 in the environment variables)
E:\blah>git push
trace: built-in: git 'push'
trace: run_command: 'ssh' '[email protected]' 'git-receive-pack '...
Enter passphrase for key 'C:\putty\my.ppk':
Which is really weird cause that ppk doesn't even have a passphrase. Though the real issue is that it shouldn't be using the putty key, it should be using ~/.id_rsa
This was working right after install, but after restarting the computer it started doing this.
Is there a way I tell git to use openssh without having to reinstall it?
it appears that git caught on to this
Maybe because putty.exe
is coming first in your %PATH%.
Check your GIT_SSH
environment variable.
set GIT_SSH
If you want to use openssh, you need to set it to git/bin/ssh.exe
:
set GIT_SSH=C:\path\to\git\bin\ssh.exe
That should ensure that the push and pull commands look for ~/id_rsa(.pub) keys instead of asking for a putty *.ppk
private key store.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With