5

I can

git add.
git commit -m "first commit"

but cannot push

git push -u origin master

error:

cannot spawn C:\Users\SEB\Downloads\plink.exe: No such file or directory fatal: unable to fork

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
niceseb
  • 493
  • 1
  • 4
  • 11
  • so... where did you hide plink.exe? – Marc B Aug 23 '16 at 18:03
  • 1
    I have no idea what is plink.exe got to do with git? Any idea how to approach this Marc? Related to putty? – niceseb Aug 23 '16 at 18:12
  • git isn't a single monolithic program. it's a set of tools for which git is the front-end. – Marc B Aug 23 '16 at 18:13
  • If you have a new question, please ask it by clicking the [Ask Question](http://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. If there is an answer that was helpful for you then accept it – Roman Marusyk Aug 23 '16 at 18:49
  • @niceseb as I said before if you have a new problem then create a new question. – Roman Marusyk Aug 24 '16 at 15:36

2 Answers2

4

First ensure that you have an installed plink.exe. I recommend to install it to Program Files because your folder C:\Users\SEB\Downloads\ is a bad place.

Then check your environment variable GIT_SSH. It should be something like:

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

or

GIT_SSH=%ProgramFiles%\PuTTY\plink.exe

This error also happened when there is a space in the GIT_SSH environment variable.

Brad Rippe
  • 3,405
  • 1
  • 18
  • 20
Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
  • Have downloaded putty.exe and plink.exe again, then echo GIT_SSH but returns nothing – niceseb Aug 23 '16 at 18:21
  • @niceseb so, just add it. If you do not want to install plink to the proper path then just create this variable and set C:\Users\SEB\Downloads\plink.exe – Roman Marusyk Aug 23 '16 at 18:21
0

I find it best to just run this, once per Windows session:

unset GIT_SSH