Cannot spawn... TortoisePlink

error: cannot spawn "C:Program FilesTortoiseGitinTortoisePlink.exe": No such file or directory  fatal: unable to fork

 
I've gotten this error several times when trying to use git over ssh:
E:web2pyapplicationsk32>git clone ssh://k32@k32.com/gits/k32.git Cloning into 'k32'... error: cannot spawn "C:Program FilesTortoiseGitinTortoisePlink.exe": No such file or directory fatal: unable to fork
Surprisingly, google couldn't help me. But, it turned out to be a very simply fix.
The problem was the space in the GIT_SSH environment variable pointing to TortoisePlink.exe. I copied the "C:Program FilesTortoiseGitin" directory to "C:TortoiseGitin" and set GIT_SSH to "C:TortoiseGitin". I actually created a symbolic link, instead of actually copying it. I didn't want to risk breaking TortoiseGit, so I didn't actually move the directory. Of course, the right answer would be uninstall TortoiseGit and reinstall it in the above folder without a space in the path, but I really wasn't in the mood for yet another can of worms today.
原文地址:https://www.cnblogs.com/flysun0311/p/3564502.html