Git fatal: the package has a bad object at offset X: inflate the returned -5

Git gave me a wonderful Christmas present ... I'm trying to git push bunch of commits, like 6 GB. And I get the following error message:

 -Counting objects: 525, done. Delta compression using up to 24 threads. Compressing objects: 100% (474/474), done. fatal: pack has bad object at offset 3453162391: inflate returned -5 error: pack-objects died of signal 13 error: failed to push some refs to ....git 

What does this mean and how is it fixed? From Google, I can say that this has something to do with the size of what I'm trying to click.

This happened at the time of writing.

+8
git zlib inflate
source share
1 answer

Based on your offset, it looks like you are trying to push some really big object (offset 3453162391 = ~> = 3 GB), so zlib could not inflate / compress the object because there was not enough space in the output buffer (error: Z_BUF_ERROR ).

This may be due to a temporary lack of memory or some buffer limitations. It basically tries to process as much input as possible using the available output, otherwise it returns Z_BUF_ERROR . See: zlib inflate returning a buffer error .

Try again to see if the problem can be reproduced.

If the problem persists, try:

  • avoid pushing large files to the git repository, git is designed to track source code files, not very large files (e.g. 6 GB),

  • increase the size of the git message on your http.postBuffer client e.g.

     git config http.postBuffer 134217728 # =~ 128MB 
  • use an alternate client that can ignore large drops like bfg like

     java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git 
  • remove the object that causes the problem ( git gc ?).

Other potential problems may include:

For further reading, check this message: "the package has a bad object" when clicking on the remote .

+2
source share

All Articles