I am trying to set up a git repo on my test server when I try to push from my windows computer
git push ssh://git@server.com:/path/.git
I get the error
fatal: The remote end hung up unexpectedly
But when I ssh’d into my server and tried to do the the exact same command it worked just fine. Is this a problem with my git setup or with my windows setup
The problem might be caused by a number of issues:
gituses SSH to spawn remotegitinstance it still spawns the default (for the user) shell on the server.plink.exeto access the server, and it asks you to accept the host’s key by entering “y” or “n” (which you can’t do).In any case, try these steps:
plink.exe git@server.com "git --version"and see it’s able to run Git on the server at all. If you don’t useplink.exeuse whatever binary is shipped with OpenSSH included with Git for Windows; probably it’sssh.exe.Export
GIT_TRACE=1before runninggit pushand see if it prints out anything hinting at what went wrong, like this: