Git: error: RPC failed; result=22, HTTP code = 411

28,092

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

git config http.postBuffer 524288000
Share:
28,092
firedev
Author by

firedev

Full-stack designer. Specializing in crafting components systems tailored to use cases on hand. Carefully stitching together back and front ends for improved user experience.

Updated on July 05, 2022

Comments

  • firedev
    firedev almost 2 years

    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
    
  • brentlightsey
    brentlightsey about 11 years
    +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.
  • JaskeyLam
    JaskeyLam almost 10 years
    how did you figure out the problem is about the buffer? Thank you !This also sovle my problem!
  • RayofCommand
    RayofCommand almost 10 years
    do changes to git config apply directly without any restart?
  • firedev
    firedev almost 10 years
    Yes, right away. You can also specify a --global option for some variables to be shared across the system.
  • taco
    taco over 9 years
    @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.