I'm trying to clone a repository. The first time I got to 82%, then it didn't budge for half an hour so I cancelled the clone and started over. After that, every time I try to clone it, I get between 6-10%, and then it fails with the error "The remote end hung up unexpectedly, early EOF." I looked up the error and tried every solution I could find, with the most popular solution being to increase postBuffer to the maximum size. However, it still keeps failing every time.
I'm not sure if it makes a difference, but I'm not trying to check in code, which was what most of the other people reporting this issue seemed to be trying to do. I'm trying to clone a repository.
To solve the issue, change the settings of your buffer so that you have enough space available. You can increase the buffer value up to 2000000000.
From the git config man page, http. postBuffer is about: 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.
Resolution. Increase the Git buffer size to the largest individual file size of your repo: git config --global http. postBuffer 157286400.
One option to reduce the size of the repo by cloning a single branch or my cloning only a certain amount of the past history.
git clone --depth=20 https://repo.git -b master
will clone only the master branch to a depth of 20 commits. Since this is a much smaller entity it will generally work, and then you can fetch other branches after. Not sure if you can recover the history after but for lots and lots of cases that is unimportant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With