Git error: Cannot Spawn ~\.ssh

I created a repo on GitHub, and wanted to push local a local repo as I have done in the past. I can ssh -T successfully, but git push -u origin master gives me the error:

error: cannot spawn C:\Users\Alec\.ssh: No such file or directory
fatal: unable to fork

My GIT_SSH variable is C:\Users\Alec\.ssh and in that directory I have my RSA keys. I even tried generating a new key and using that one, just to receive a the same error.

All of my local repos now show this error – I’m not sure what’s gone wrong.

Edit: Not that I think it matters, but I get the same issue whether I use the Command Prompt or Git Bash.

  • How to automatically put a file as resolved after merge
  • PHPUnit, Zend Framework 2 Getting Started tutorial, WAMP and git
  • Error while using Git on windows 7
  • Unable to fix eol whitespace issue in git
  • git commands not working in git bash (windows 7 x64)
  • TortoiseSVN working copy folder with conflicts but file list is empty
  • How do I open the Git GUI from a command window?
  • How do I change the default location for Git Bash on Windows?
  • 3 Solutions collect form web for “Git error: Cannot Spawn ~\.ssh”

    GIT_SSH is supposed to point to the ssh client (ssh.exe in your case), not the .ssh folder.

    I’ve got the same problem with you. and all what i do is to shut down my comodo firewall, and that really works. so i suggest you close your firewall and antivirus software. Good luckl.

    I had the same problem as well. I thought is was something with the firewall as well, but I ended up re-installing Git on my PC and then it suddenly worked like a charm.

    Git Baby is a git and github fan, let's start git clone.