Why can't I install Git for Windows with OpenSSH?
I've run into this before. Much needs to be done to switch to OpenSSH.
Edit
C:\Program Files (x86)\Git\setup.ini
and REMOVE the following lines (IF they are in the file):GIT_SSH=C:\Program Files (x86)\PuTTY\plink.exe SVN_SSH=C:\Program Files (x86)\PuTTY\plink.exe
Edit
C:\Program Files (x86)\Git\etc\profile
and REMOVE the lineexport PLINK_PROTOCOL=ssh
Make sure you have an SSH private key file. File is in OpenSSH format NOT in PuTTY private key format,
.ppk
.Create a
.ssh
directory for the Git user and copy theid_rsa
file there.md c:\Users\Git_User\.ssh
Open a DOS command Window and type in the command
set | more
Look for
GIT_SSH
andSVN_SSH
If found, this indicates that it is configured in the Windows Environmental variables. You will need to remove it from there.
From the Start Menu, open the Control Panel
- Select User Accounts
- Select Change my environment variables
- Highlight GIT_SSH ...
- Click on Delete
- Click on OK
Repeat this for SVN_SSH.
On my machine, doing these operations DISABLES TortoiseGit. It might be better to fix your Git config to use TortoiseGitPlink.exe
. There is also a TortoisePlink.exe
in the TortoiseGit/bin
directory - don't use it. TortoisePlink.exe
does NOT work for me.
Related videos on Youtube
![Taylor Hx](https://i.stack.imgur.com/70aaH.jpg?s=256&g=1)
Taylor Hx
Information Technology Consultant, Full-Stack Developer, Systems Administrator, DevOps Engineer and Video Game Enthusiast. Raised in SME, Wearer of Many Hats. Melbourne, Australia.
Updated on September 18, 2022Comments
-
Taylor Hx almost 2 years
Whenever I try to install Git for Windows, using the installer downloaded from here, the installation seemingly skips the step where I configure my Secure Shell client for Git.
Normally during installation, a screen prompting the user to choose one of either OpenSSH (installed with Git) or PuTTY PLink (the default option) is shown. With my latest few installs, this screen is nowhere to be found. Instead, Git seems to be silently configured to use PLink without any input from me.
Can anyone tell me why this is happening?
If I cannot choose which SSH client to use at installation, can anyone tell me how to reconfigure Git to point to OpenSSH instead of TortoisePLink?
This seems to controlled by a Git environment variable (mine reads "GIT_SSH=c:\Program Files\Putty\plink.exe" as opposed to "GIT_SSH=ssh.exe" as it does on another PC with Git working).
As a work around, does anyone know how to change this variable?
-
Taylor Hx about 10 years+1. Thanks for the info. Unfortunately, I don't have the offending PC's with me anymore, do I can't test this, but I will try this next time I encounter the issue.