None of the answers so far worked for me. What ended up fixing this issue for me was removing quotes from my GIT_SSH
variable and don’t escape any characters at all, no MSYS path style (eg. /c/path\ to\ putty/plink.exe
). Just enter the path normally, Git handles the quoting.
set GIT_SSH=C:\path to putty\plink.exe
That’s it. When using GIT_TRACE you can see that the variable gets quoted in the resulting command so:
-
the added double quotes change the string passed to the command and
-
the path is wrapped in single quotes so the spaces are ok.
Hope that helps someone.