问题
I'm using TortoiseGit, and I've just upgraded Git for Windows from an older version to 2.7.2. In the process, the location of ssh.exe
has moved from C:\Program Files (x86)\Git\bin\ssh.exe
to C:\Program Files\Git\usr\bin\ssh.exe
.
This has broken my ability to fetch changes in TortoiseGit, since it can't find ssh.exe
at the original location. Looking at Show Environment Variables in the settings (Image 1), I get a generated file with the GIT_SSH
environment variable set to the old path (Image 2).
I have no idea where this is coming from. It doesn't appear to be part of Windows' environment variables.
Any idea where this is set so that I can change it?
Image 1 - Settings Window
Image 2 - GIT_SSH Environment Variable
回答1:
Just enter 'ssh.exe' on TortoiseGit settings -> Network as SSH client. As TortoiseGit sets the PATH you don't need to enter the full path to ssh.exe.

回答2:
You can check:
- your keys in
HKEY_CURRENT_USER\Software\TortoiseGit
(remove or amend any ssh one) - as mentioned in "How to install/setup TortoiseGit to work with GitHub",
TortoiseGit->Settings->Network
(Set SSH Client property to/bin/ssh.exe
)
来源:https://stackoverflow.com/questions/36003252/how-do-you-update-the-git-ssh-environment-variable-on-windows