Error: Cannot Spawn C:\Path To\TortoiseGit\Bin: No

2020-03-10 09:12发布

Trying to do a fetch from origin:

git remote update

Get the error

Error: Cannot Spawn C:\Path To\TortoiseGit\Bin: No such file or directory
fatal: unable to fork
Error: Could not fetch origin

Why is this happening? Also is there a fix?

6条回答
疯言疯语
2楼-- · 2020-03-10 09:17

I faced this problem when I was required to remove and install the TortoiseGit and Git. Previously both was installed on C:\ but later I installed those on F:. So after re-installing when I tried to pull repositories it was giving me the following error while using from context menu

error: cannot spawn C:\Program Files\TortoiseGit\bin\TortoisePlink.exe: No such file or directory

After little bit investigation I went to Settings->Network and update the SSH Client path from C:... to F:... and then it was resolved.

查看更多
相关推荐>>
3楼-- · 2020-03-10 09:28

This blog would seem to be the exact same problem that you have:

http://www.techneiq.com/2012/08/error-cannot-spawn-cprogram.html

And this issue on msysgit also points to the same error:

https://code.google.com/p/msysgit/issues/detail?id=313

Find out what your GIT_SSH environmental variable is pointing to and if that path has a space in it. Maybe reinstalling TortoiseGit would solve it. (Otherwise I can really recommend GitExtensions instead)

查看更多
该账号已被封号
4楼-- · 2020-03-10 09:28

For me the answer was removing the double quotes of "c:\Program Files (x86)\PuTTY\plink.exe" from the environment variable GIT_SSH.

查看更多
时光不老,我们不散
5楼-- · 2020-03-10 09:33

Set environment variable GIT_SSH to

%ProgramFiles(x86)%\PuTTY\plink.exe

or

%ProgramFiles%\PuTTY\plink.exe
查看更多
祖国的老花朵
6楼-- · 2020-03-10 09:33

You can just find the copy the directory into the place which the error message has point out.

查看更多
一夜七次
7楼-- · 2020-03-10 09:42

For me, for TortoiseGit>Settings>Network>SSH , I had to set it to just ssh.exe instead of the full path to ssh.

查看更多
登录 后发表回答