On Cygwin, running git clone git@..., git pull or git push, where the remote is an SSH repository address, fails. Below is output of running git clone:

Cloning into 'iko-app-rocket'...
fatal: cannot run C:\Users\sakynimoD\scoop\apps\openssh\current\bin\ssh.exe: No such file or directory
fatal: unable to fork

As you can see from the path, I had used scoop, the Windows package manager. I used it to install Gradle, and it installed some other things as dependencies, including ssh. I've since deinstalled scoop, in the recommended way, along with all the packages it installed, but the error persists.

A workaround is declaring that git should use the ssh executable for SSH, which sounds rendundant, but apparently isn't: env GIT_SSH=ssh git pull works.

  • @derobert, GIT_SSH was set in Windows' environment variable settings. Unsetting fixed the problem. Please submit as answer, so I may accept it. Dec 21, 2017 at 17:25
  • Answer added. Please feel free to edit my answer to add in where the Windows environment variable settings are — they used to be at right-click My Computer, but no idea where they are on modern Windows...
    – derobert
    Dec 21, 2017 at 17:36

1 Answer 1


Since you discovered that explicitly setting GIT_SSH=ssh works, the next thing to investigate is if it was already set, possibly by scoop. You can check by running echo "$GIT_SSH" or alternatively by running env to display the entire environment.

If it is set, that could either be coming from Windows' environment variable settings or from a .bashrc or similar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .