68

Symptoms:

Git suddenly refused to push a repository (to github in my case):

$ git push
Counting objects: 9292, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2136/2136), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (8222/8222), 1.27 MiB | 837 KiB/s, done.
Total 8222 (delta 6060), reused 8181 (delta 6033)
fatal: The remote end hung up unexpectedly
Everything up-to-date
firedev
  • 20,898
  • 20
  • 64
  • 94
  • 2
    possible duplicate of [git push fails: RPC failed; result=22, HTTP code = 411](http://stackoverflow.com/questions/12651749/git-push-fails-rpc-failed-result-22-http-code-411) – rodrigorgs Mar 24 '14 at 16:29

1 Answers1

155

Here is what helped, the following command increases git buffer to 500mb:

git config http.postBuffer 524288000
firedev
  • 20,898
  • 20
  • 64
  • 94
  • 1
    +1 for posting a helpful self-answer. ProjectLocker had been working well for me for weeks, then suddenly I was getting this message. This answer worked for me. – brentlightsey May 23 '13 at 11:12
  • 1
    how did you figure out the problem is about the buffer? Thank you !This also sovle my problem! – JaskeyLam Jul 18 '14 at 16:40
  • do changes to git config apply directly without any restart? – RayofCommand Sep 24 '14 at 13:35
  • 1
    Yes, right away. You can also specify a `--global` option for some variables to be shared across the system. – firedev Sep 24 '14 at 23:00
  • 2
    @Jaskey I'm guessing he realized an HTTP 411 code is a 'content length required' error and decided to try changing the buffer size. I had this problem too, so I'm just guessing. – taco Oct 28 '14 at 15:40