Tag Archives: fatal protocol error bad pack header

Git Error: fatal protocol error bad pack header [How to Solve]

In the process of using git, fatal: protocol error: bad pack header always appears, which makes git unable to update and upload. See the following for specific error reports:

fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

Try many ways online, such as the following:

git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1"

I’ve tried to think it’s a version problem, but check my git version. Centos7 uses Yum to install the same version.

None of them have been solved.

So I looked at the memory. Although it was still enough, there was no other way. So I upgraded the machine from 1c4g to 1c8g. After the upgrade, the problem was solved.

It seems that there is still not enough memory. It may be solved by restarting and releasing memory, but there is no attempt here