Fetch-pack unexpected disconnect while reading sideband packet

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to send my projects via bash to the repo and suddenly I get the following error unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly in Github. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

I am just trying to send my project to the repo by bash and I am facing the following error.

Enumerating objects: 27, done. Counting objects: 100% (27/27), done. 
Delta compression using up to 16 threads Compressing objects: 100% (24/24), done. 
Writing objects: 100% (25/25), 187.79 KiB | 9.39 MiB/s, done. 
Total 25 (delta 1), reused 0 (delta 0), pack-reused 0 

send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly

How To Solve unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Error ?

  1. How To Solve unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Error?

    To Solve unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Error If You are using the Windows Operating system then Just execute this command before executing the Git command. set GIT_TRACE_PACKET=1 set GIT_TRACE=1 set GIT_CURL_VERBOSE=1 Now your error should be not appearing.

  2. Github – unexpected disconnect while reading sideband packet

    To Solve unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Error If You are using the Windows Operating system then Just execute this command before executing the Git command. set GIT_TRACE_PACKET=1 set GIT_TRACE=1 set GIT_CURL_VERBOSE=1 Now your error should be not appearing.

Solution 1: For Windows

If You are using the Windows Operating system then Just execute this command before executing the Git command.

set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1

Fetch-pack unexpected disconnect while reading sideband packet

Then Try this command

git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow 
git pull --all

Solution 2: For Linux/Mac

If you are using Mac Or Linux Operating system then Just execute this command before executing the Git command.

export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

Then Try this command

git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow 
git pull --all

Solution 3: committing with each addition

  1. Just delete the .git folder
  2. then add a few files at a time or make change in your existing file.
  3. commit with each addition.
  4. Now your error should be not appearing.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

  • SyntaxError: invalid syntax to repo init in the AOSP code.

September 7, 2021 | by Dominique St-Amand |

In the organization I currently am, on a specific projet, the GIT repository is pretty beefy and large. I had not updated the development branch in a while, due to my assignation on some other projects. Once I had some time to come back to work on this project and see where the team was in terms of code, I wanted to make sure my local development branch was up to date with the remote by pulling the code using the the git pull command.

After issuing the command, I got the following error:

fetch-pack:unexpected disconnect whilereading sideband packet

fatal:early EOF

fatal:fetch-pack:invalid index-pack output

This seems to be related to the decompression of the code once it’s received from the remote.

One solution to counter this problem, is to switch the remote to HTTPS

git remote set-url origin https://<organization>@dev.azure.com/<organization>/<project>/_git/<project>

Another solution is to set the set the core compression to none (or 0)

git config --global core.compression 0

Doing either or should allow you to pull. The same can be done if there’s a problem with the cloning of the repository.

Views: 4,614

gitssh