Nov 16 2010

fatal: The remote end hung up unexpectedly

Published by michael at 8:47 am under Miscellaneous

I committed changes to my GIT project, tried to push them to the remote server (git push) and got the following cryptic error message:

fatal: The remote end hung up unexpectedly

The GitFaq states that:

Git push fails with “fatal: The remote end hung up unexpectedly”?
If, when attempting git push, you get a message that says:
fatal: The remote end hung up unexpectedly

There are a couple of reasons for that, but the most common is that authorization failed. You might be using a git:// URL to push, which has no authorization whatsoever and hence has write access disabled by default. Or you might be using an ssh URL, but either your public key was not installed correctly, or your account does not have write access to that repository/branch.

I used “git config –list” to review my project configuration

core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git://git.some-domain.com/my-project
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.v2.remote=origin
branch.v2.merge=refs/heads/v2
gui.geometry=1374×727+34+82 301 201

The culprit here is the “remote.origin.url” property, it’s pointing to a read-only repository. We can change this using “git config –edit”. We want to change:

remote.origin.url=git://git.some-domain.com/my-project

to

remote.origin.url=git@git.some-domain.com:/my-project

Please note that the specific user “git” is specific to my setup and your GIT setup/configuration is most likely different. After this change I was able to successfully push my changes to the remote server.

The reason to why I got the read-only version of the project was because I used “git clone git://git.some-domain.com/my-project” when I should have used “git clone git@git.some-domain.com:/my-project”

Share and Enjoy:
  • del.icio.us
  • Google Bookmarks
  • Technorati
  • Twitter
  • StumbleUpon

Related posts:

  1. fatal: git checkout: updating paths is incompatible with switching branches. Using GIT I tried to pull down a new remote...
  2. GIT Fatal You Have not Concluded Your Merge MERGE_HEAD Exists fatal: You have not concluded your merge. (MERGE_HEAD exists) I...

No responses yet

Trackback URI | Comments RSS

Leave a Reply