DevOpsGitVersion Control Systems

How to fix remote end hung up unexpectedly error in Git

GIT is one of the widely used version control system to track changes made in the source code. While using Git, you may face following error while trying to execute any Git command like push, pull, merge, and other commands from Git command line.

Git Error

fatal: The remote end hung up unexpectedly

$ git push
Counting objects: 1433456, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (160218/160218), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (1433456/1433456), 243.80 MiB | 12.43 MiB/s, done.
Total 1433456 (delta 1123456), reused 1123333 (delta 1123423)
fatal: The remote end hung up unexpectedly

Solution

To resolve the issue, increase the http post buffer size by executing below command and retry.

git config --global http.postBuffer 247286400

Note - This issue is Git client specific and related to the Git server.

What is http.postBuffer?

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.

Source - Git Documentation

Found helpful? Don't forget to like & share the post!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button