I have a fresh Centos 6 server stood up and I have installed git version 1.7.1 through yum. I am using the smart http method through apache for access.

When I try to push to the remote server this is what I get:

$ git push origin master
Counting objects: 6, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 436 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
error: unpack failed: index-pack abnormal exit

I have tried these things which made no difference:

  • chown -R apache:apache /path/to/git/repository (httpd runs as apache)
  • chown -R apache:users /path/to/git/repository
  • chmod -R 777 /path/to/git/repository (obviously not secure but wanted to eliminate this being a file permission problem)

What can I try to get pushing to work?

1 Answer 1


This may be similar to https://stackoverflow.com/questions/4826639/repack-of-git-repository-fails. I have seen similar errors when the repository is big (1-2GB) and I run out of memory on the server. Specifically, the "git pack-objects" process on the servers eats up a lot of memory and processor time.

Solutions seem to include repacking the repository on the server:

git repack -a -d -f --window-memory 10m --max-pack-size 20m

Or adjusting the Git configuration on the server to reduce memory usage, such as:

git config pack.windowMemory 10m
git config pack.packSizeLimit 20m

You may need to play with the 10m and 20m values, depending on the amount of memory available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.