How do you update the GIT_SSH environment variable on Windows

烈酒焚心 提交于 2019-12-07 09:23:12

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!