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:

  • pre-commit hook not working
  • git seems confused about whether a file has changed (with autocrlf=true option)
  • Bash Folder-File coloring in msysgit on Windows?
  • Automate git bisect for MSBuild/NUnit/.NET/Windows batch commands in msysgit?
  • How to check if a repo exists?
  • Push a git branch to a remote server which has not got git installed
  • I can’t push a simple readme onto my repository on github.

    $ ssh -T git@github.com 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?

  • Project not under version control - Imported from EGit repo
  • How to trigger Jenkins Multi-Branch Pipeline with Gitlab Webhook
  • How to disconnect local git repo from remote master
  • Jenkins Execute Bash Based on Git Branch
  • Don't have access to Heroku app
  • How to know the release version for a commit in android source?
  • 3 Solutions collect form web for “fatal: remote server hung up unexpectedly”

    There is a file in .git directory, 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 git@github.com:path/to/repo
    
    git remote set-url origin git@github.com:user/test.git
    

    You must have set the ssh url for the origin wrong when adding the remote. Do:

    git remote set-url origin git@github.com:user/repo
    

    to correct.

    Or just do git config -e or vim .git/config and correct the url in the config directly under [remote "origin"]

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