Git pull/push error: RPC failed; result=22, HTTP code = 408

I am new to GIT. I am using Git version

I am working on project hosted on github. While pushing and pulling the code from github sometime it works fine and some time it gives me error.

error: RPC failed; result=22, HTTP code = 408

fatal: The remote end hung up unexpectedly

I don’t what is going wrong. If anyone can suggest me something what could possibly be the issue.

  • git: have different .gitignore file for each remote
  • Git authentication fails after enabling 2FA
  • Git push failure (Github/RStudio)
  • Proper workflow using git and github
  • Enabling git in Windows 10 command line
  • Git: Any Way I Can Prevent *Most* Users From Editing Files?
  • Smarty as a submodule
  • git revert changes and cancel pull request
  • 2 Solutions collect form web for “Git pull/push error: RPC failed; result=22, HTTP code = 408”

    The problem is due to git/https buffer settings. In order to solve it run this below command:-

    git config http.postBuffer 524288000

    And try git push again

    I, too, got this recently, and @shiminsh’s solution “Worked for me”, gazing at the documentation {well looking at the output from man git-config} we have:


    Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.

    I do wonder, though, if a limit of around 0.5 GBytes might be a bit much the other way…! I am using Git version on a Debian Wheezy Linux platform but I doubt that is that relevant to this issue. What this setting is basically saying is “for pretty much anything you send to the remote system use HTTP/1.1 and Transfer-Encoding: Chunked and don’t worry about creating a massive pack file locally”.

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