Git clone fails with fatal unexpected and invalid messages. The git repository is over 1GB and there is a work-a-round that made it possible to finally clone the repository successfully.
fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output
Some sites suggested using SSH clone rather than http. That wasn’t an option. Another suggesting using git debugging to diagnose the problem. This wasn’t very helpful.
export GIT_TRACE_PACKET=1 export GIT_TRACE=1 export GIT_CURL_VERBOSE=1
Execute the following commands.
git clone --depth 1 YOUR-URL-TO-CLONE ./ git fetch --unshallow git pull
After executing the previous commands, the clone was a success.