fatal: remote server hung up unexpectedly
I’ve looked at the other threads with similar questions, but I’m new to git, so most of it didn’t make sense 🙁
Here’s the problem:
I can’t push a simple readme onto my repository on github.
$ ssh -T firstname.lastname@example.org seems to be working fine.
But whenever I push the README using the following:
$ git push origin master
I get the following error –
ssh: connect to host githum.com port 22: Connection timed out fatal: The remote end hung up unexpectedly
Notice that it says the host is ‘githum.com’. So I must have made a typo when I was setting up the ssh keys for git. How do I correct this and make sure the remote end works properly?
3 Solutions collect form web for “fatal: remote server hung up unexpectedly”
There is a file in
config. You can fix it there. (You can edit the same with
git config -e).
Or use the command to fix the origin:
git remote set-url origin email@example.com:path/to/repo
git remote set-url origin firstname.lastname@example.org:user/test.git
You must have set the ssh url for the origin wrong when adding the remote. Do:
git remote set-url origin email@example.com:user/repo
Or just do
git config -e or
vim .git/config and correct the url in the config directly under