git clone from gitlab - unexpected disconnect while reading sideband packet

Viewed 5701

I try to clone a git repo (from gitlab) with HTTP but it gives me the following error:

$ git clone http://gitlab.XXX....git                          
Cloning into 'XXX'...
remote: Enumerating objects: 241, done.
remote: Counting objects: 100% (241/241), done.
remote: Compressing objects: 100% (113/113), done.
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed

Any solution for that, please?

Note that the repo is large (it contains 3.3GB of resources).

Thank you so much!

2 Answers

it's due to low connectivity of your internet. Try to change into different network or check your internet connection

I came across this issue while installing Homebrew on macOS. I entered the following commands on the Terminal and it worked for me.

Run uninstall script:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Set Git Compression:

git config --global core.compression 0

Set Git buffer size:

git config --global http.postBuffer 1048576000

Run installation script:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Related