git Push Failed error: cannot spawn fatal: unable to fork
I seem to be getting an error that I cannot resolve when pushing.
I am using IntelliJ 13.1.4
I can commit fine to git, but when I try to Push I get an error:
Push failed
C:\<source_path>
error: cannot spawn
C:\users\<user_name>\AppData\Local\Temp\git-ssh-<random_number>.bat: No such file or directory
fatal: unable to fork
I have tried:
1. Updating to most recent IntelliJ (I forget what version I was on prior to this. It was fairly recent though.)
2. Rebooting
As I didn't setup this file or path anywhere that I recall I assume this is an internal operation.
I can commit and push fine from git-bash so it appears it is specific to IntelliJ.
I did a grep against the installation directory and the git-ssh reference is only found in two files:
C:\Program Files (x86)\JetBrains>grep -ir "git-ssh" .
Binary file ./IntelliJ IDEA Community Edition 13.1.2/plugins/git4idea/lib/git4idea-rt.jar matches
Binary file ./IntelliJ IDEA Community Edition 13.1.2/plugins/git4idea/lib/git4idea.jar matches
Any way to recover?
请先登录再写评论。
Same issue here with PyCharm:
(venv) C:\Users\noson\PycharmProjects\smallplex>git push -u origin master
error: cannot spawn ssh: No such file or directory
fatal: unable to fork
Hi,
I know i'm resurrecting an old topic, but i found a solution.
I noticed VS Code had problems with Windows Execution Policy settings, and loaded them wrong. I thought my Pycharm/IDEA bug maybe had the same cause. I tinkered around a bit, and find a dirty horrible solution.
Anywhere on your computer, create a file named 'launchpowershell.bat'. Inside it, write "powershell -ExecutionPolicy AllSigned" without the quotes.
Finally, in your Pycharm/IDEA/whatever, go in Settings -> Tools -> Terminal. Change the Shell Path to your new .bat file (you need the full path, ending with the name of the file, not only its folder).
Finally, either push or pull won't work. For me it was push, so the following commands will be for push, but feel free to change 'push' to 'pull'.
On your terminal, type "git config --global alias.pushf '-c core.quotepath=false push'"
Now instead of "git push", you can use "git pushf" (for git push fixed). It will launch "git -c core.quotepath=false push", and your directory will be found. It will work like git push should have work.
And voilà !