Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
Password:
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?

share|improve this question
add comment

1 Answer

This may be similar to http://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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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