Reputation: 71
I try to install brew to install python libs using the code
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
But I get this error
error: 1262 bytes of body are still expected MiB | 11.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Failed during: git fetch --force origin
tried the gpt solution to it but it didn't work. git config --global http.postBuffer 157286400 This will increase the size of the buffer that Git uses when fetching data from the remote repository, which may help to resolve the issue if it is caused by large files or a slow connection.
I also tried to run this
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
I got the same error. Keep in mind that my internet is working properly and I am browsing the web.
Upvotes: 7
Views: 28006
Reputation: 18624
I had this issue and couldn't fetch a repo. So what I did was to first clone shallow a single branch. And then unshallow the repo.
git clone --depth=1 -b main https://repo
To unshallow see the excellent answer https://stackoverflow.com/a/17937889/520567
Note that I needed to run the fetch
command a couple of times until it succeeded. The difference is that when clone
fails, the target dir is removed. When fetch
fails, all objects fetched remain. So running fetch
multiple times helps you get more and more objects until all pass through.
Upvotes: 2
Reputation: 41
Looking for solutions to this on Windows 10 took me to:
The current workaround appears to be to use PuTTY/Pageant instead of open-ssh tools on windows.
Maybe this will help you or someone else track progress on a real fix if it is on Windows. I don't get this issue on my Ubuntu system.
Upvotes: 4
Reputation: 89
You can try changing the compression configuration:
git config --global core.compression 0
Upvotes: 8