I have mysysgit and TortoiseGit installed on a Windows PC, which connects to a remote Git repo on a Linux box. I have created ssh keys, and added them to the profile in TortoiseGit. When I interact with the remote repo in TortoiseGit, it all works fine. No password prompting. However, when I try to run Git commands from the command line, I get prompted for the SSH password.
What do I need to do so that I'm not prompted for the password from the command line?
Make sure your git session references the
TortoisePLink.exe (in GIT_SSH environment variable), as described in "Why git can't remember my passphrase under Windows":
(you might have done the first two steps already)
- convert your key for use with TortoiseGit's
- Run TortoiseGit's
pageant.exe, open your
.ppkfile ("Add Key"), and provide your passphrase for your key.
add the environment variable:
This assumes your TortoiseGit is using
The OP scott80109 concludes in the comments:
msysgit was installed to use Open SSH.
I changed it to use
plink, and it now works without a prompt
Erez A. Korn adds in the comments:
I prefer to use openssh as it doesn't require me to have my key in an alternative format (ppk).
I've written a small wrapper to launch the
ssh-agentand take care of business and then added it to my Windows Startup.
You can check the code in