Why do I get error: RPC failed; result=52, HTTP code = 0 fatal: The remote end hung up unexpectedly when pushing to github?

Bitbucket has the same error message. Often it is related to degraded server performance. Before you start doing anything else, check:

  • https://bitbucket.status.atlassian.com/

  • https://www.githubstatus.com/


This error also happens if your HTTP post buffer is too small for the changes you want to push.

In this case, the solution is to increase it, for example using

git config http.postBuffer 524288000

Now it is working! I didn't even change a thing.

This kind of an error ' result=52 ' is an error with github itself. Github.com was going down and when I tried uploading I got the error. Now the site is back up and I can commit like normal.