I have followed the instructions here: http://help.github.com/win-set-up-git/ to set up git on my windows 7 machine.
I can use “git bash” and run commands. I am prompted for my key’s pass phrase and can successfully connect. E.g.:
$git push -u origin master
Enter passphrase for key '/c/Users/mbj/.ssh/id_rsa':
Everything up-to-date
Also this:
$ ssh -T git@github.com
Enter passphrase for key '/c/Users/mbj/.ssh/id_rsa':
Hi markbrenigjones! You've successfully authenticated, but GitHub does not provi
de shell access.
$ which ssh
/bin/ssh
However, when I open a regular windows command prompt and run the same command, I get this:
C:\util\meta_vimrc>git push
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Also this:
C:\util\meta_vimrc>ssh -T git@github.com
Permission denied (publickey).
C:\util\meta_vimrc>which ssh
C:\Program Files (x86)\Git\bin\ssh.exe
How do I get this working from the non “git bash” prompt?
Perhaps the program has no idea where your
HOMEdirectory is when running from the Windowscmd.exeinterpreter. For this to work, the ssh configuration directory with your key has to be found, namely/c/Users/mbj/.ssh.Set this by running: