git.exe pull error: cannot spawn git: Invalid argument

toouur picture toouur · Feb 4, 2018 · Viewed 14.8k times · Source

I have an error exactly as it's on the picture.

enter image description here

Tried various settings, googled, reinstalled. Git pull doesn't work in TortoiseGit, I can commit and push, though.

I have ssh client in network tab. What else can I try?

Answer

MrTux picture MrTux · Feb 7, 2018

Update:

Git for Windows 2.16.1(4) is out and that should fix this issue: https://github.com/git-for-windows/git/releases


Old answer:

This is a known issue in Git for Windows 2.16.1(2) and 2.16.1(3): https://github.com/git-for-windows/git/issues/1481

Only workaround is to use Git for Windows 2.16.1 (Download) (or older; 2.16.0 has other critical issues: TortoiseGit revert failed - unable to revert local changes).

Just for the notes, bugreport in TortoiseGit: https://gitlab.com/tortoisegit/tortoisegit/issues/3156

PS: For Git for Windows >= 2.16 you need at least TortoiseGit 2.5.7 (cf. https://stackoverflow.com/a/48457419/3906760).