How can I resolve fetch-pack: unexpected disconnect while reading sideband packet

Ruma Kumari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2023

$ git clone https://innersource.*.com/*repoName.git
Cloning into 'repoName'...
remote: Enumerating objects: 2845, done.
remote: Counting objects: 100% (2845/2845), done.
remote: Compressing objects: 100% (2615/2615), done.
error: 2272 bytes of body are still expected | 2.14 MiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

5 answers

1 accepted

6 votes
Answer accepted
Victor Menes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2023

Hey Ruma,

 

Let's try to help you out here as I've seem some other users with the same issue.

In the past, I've seem below command being ran by the user received the error while trying to clone and it got resolved.

 

  • Let's try to resolve the issue by increasing buffer:
    git config --global http.postBuffer 52428800
  • Turn off the compression
    git config --global core.compression 0
    
  • Try the workaround here:
    $ git clone https://innersource.%2A.com/*repoName.git --depth 1
    $ cd repository
    $ git fetch --unshallow

Please let me know if that was helpful and if it resolved it :)

Akshi Srivastava
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2023

Thanks,

It works for me

David Leach January 16, 2024

while this is an answer I don't understand why this only occurs against a bitbucket server. I have NEVER seen this error when pulling from GitHub so what is it about bitbucket servers that invoke this error?

DJ Stomp
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 24, 2024

Oh, it happens with GitHub too.

a4j9Pyb

David Leach February 26, 2024

I see that it did for you. I have literally never seen it happen in the 4+ years I've been engaging with GitHub. But I can pretty much get it to happen 50-70% of the time to our internal bitbucket.

karoofish
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2024

Oh, it does.

This has happened on several occasions to me.

This is just the latest round of looking for solutions for github.

karoofish@endeavour ~/d/r/egui (master)> git fetch --unshallow
remote: Enumerating objects: 37799, done.
remote: Counting objects: 100% (37799/37799), done.
remote: Compressing objects: 100% (8446/8446), done.
error: 6712 bytes of body are still expected MiB | 281.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

 

0 votes
David Leach September 26, 2024

In my particular case, I found a different answer after trying all the suggestions here and other places that did not work. 

I took a virgin corporate laptop and found that the problem did not appear. I compared the 'git config --list' between the two laptops and found a difference. On my laptop, at some point in the last 3-4 years, I added a configuration that changed the SSH client to use OpenSSH.

I had the following line:

sshCommand = C:/Windows/System32/OpenSSH/ssh.exe


I think a default configuration of git uses 

 

http.sslbackend=openssl

 

I commented out the sshCommand and my test case ran overnight without a failure. 

0 votes
Jürgen Oswald
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 26, 2024

Seeing the same issue in my Azure App Service that's connected via the built-in bitbucket deployment integration. First deployment after reconnecting to bitbucket in the Azure settings usually works, but after one or 2 more pushes to the repo we're seeing the same error as above. Haven't really found a fix that worked. Help greatly appreciated. Project is currently at around 20MB. May have first appeared after pushing a bunch (~20) custom nupkg packages that each weighted around 90KB.

0 votes
abougouffa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2024

I think this is related to Git LFS. You can try to install and enable Git LFS and try cloning the repo again.

 

# Install git-lfs with your package manager
sudo apt install git-lfs

# Enable Git LFS
git lfs install

# Clone the problematic repo
git clone path/to/repo.git
0 votes
Ricardo Bolívar March 24, 2024

It doesn't always fix it, it seems. I've never had this error before, but it happened when trying to clone a Github repo (that I've never tried before) by Github Desktop as well as by git clone the URL, and now again while trying the "fix".


git config --global http.postBuffer 52428800

git config --global core.compression 0

cd /Volumes/WD_Elements2018/GitHub/

git clone https://github.com/eliranwong/UniqueBible.git --depth 1
Cloning into 'UniqueBible'...
remote: Enumerating objects: 187613, done.
remote: Counting objects: 100% (187613/187613), done.
remote: Compressing objects: 100% (186984/186984), done.
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 1378 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

 :(

Ricardo Bolívar March 24, 2024

Further information on this repo. I'm currently trying the zip download from Github, and it's "resuming …" at around 250 MB. Earlier when cloning with Github Desktop it was around 200MB and only reported as 2 or 3% progressed, before I had received the unexpected disconnect, and all of that, the first time! So this might be one of the larger Github repo's I've tried to download.

Also, I'm not on my home Internet, but on shared hotel Internet, and the speed is not so fast, although it's not unusual to sometimes get slow Github downloads.

Birhanu Shiferaw
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2024

remote: Enumerating objects: 340, done.
remote: Counting objects: 100% (305/305), done.
remote: Compressing objects: 100% (114/114), done.
error: 7461 bytes of body are still expected | 207.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output  i have faced this error what shall i do

 

Ricardo Bolívar June 19, 2024

I still don't know why exactly it happened, but three months after my previous attempt, with the same problem, I just tried downloading it again, and it cloned without any error and completed in several minutes. So I can only suppose that try again later is the likely solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events