10

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?

2
  • I think this belongs on Superuser. Commented Oct 23, 2013 at 2:34
  • 7
    I think this is a valid question for StackOverflow. Git and the SSH tools mentioned are definitely software tools commonly used by programmers, and this is even a practical, answerable problem that is unique to software development (from the help center). Commented Oct 6, 2014 at 17:37

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

1 Comment

This answer helped me solve the reverse problem: My MINGW install was trying to use ssh, but I wanted it to use Putty, so I set GIT_SSH to C:\Program Files (x86)\PuTTY\plink.exe and it worked.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.