Reputation: 225
I have a problem when I'm trying to clone with git on cygwin. My GIT_SSH is
"C:\ProgramFiles(x86)\Git\bin\".
When I try to clone, here is the result:
$ git clone ssh://*****/home/local/git/prestashop myDirectory
Cloning into 'myDirectory'...
error: cannot spawn C:\ProgramFiles(x86)\Git\cmd\: No such file or directory
fatal: unable to fork
I've seen many question related to that problem but I can't find answers to solve this problem. All ideas welcome ! Thanks !
Upvotes: 14
Views: 17296
Reputation: 4405
In my case, since I was using Git Extensions (3.3.1), I had adjust my SSH Client path.
Todo so, I went to Menu Tools > Settings > Git Extensions (category on left side) > SSH and adjusted my SSH Client path to C:\Program Files\git\usr\bin\SSH.EXE
Facing this issue once again, after switching to Putty, because Pageant allows me to set my private once a day without exposing outside, where I've forgot set Putty as my ssh client, by going to Tools > Settings > Git Extensions (category on left side) > SSH > And setting Putty as my ssh client
Upvotes: 9
Reputation: 1329472
Following Git with SSH on Windows, you see that GIT_SSH should reference the ssh executable, not just its path:
(old msysgit)
set GIT_SSH=C:\Program Files (x86)\Git\bin\ssh.exe
(new 2015 git for Windows)
set GIT_SSH=C:\Program Files\Git\usr\bin\ssh.exe
Upvotes: 21