Git indexing fails due to bad pack header

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Fisheye fails to index a Git repository and the following appears in the atlassian-fisheye.log:

1 2 3 2013-06-10 13:44:47,391 INFO [IncrementalPinger1 ] fisheye OneOffPingRequest-doRequest - Exception during FishEye Incremental Indexing of GITREPO: Unable to fetch from remote repository: file:///mnt/git/GITREPO.git - [error: pack-objects died of signal 7, error: git upload-pack: git-pack-objects died with error., 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]

Cause

This often indicates memory problems on the server.

Resolution

Log in to the server as the SSH user used to connect to the repo and run the commands below:

1 2 3 git config --global pack.windowMemory "100m" git config --global pack.packSizeLimit "100m" git config --global pack.threads "1"
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.