我有一个新的Centos 6服务器站起来,我已经安装git 1.7.1通过百胜。 我通过Apache访问使用智能http方法。
当我尝试推送到远程服务器这是我得到:
$ 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
我试过这些没有区别的东西:
我可以尝试推动什么工作?
这可能类似于https://stackoverflow.com/questions/4826639/repack-of-git-repository-fails 。 当存储库很大(1-2GB),并且服务器上的内存不足时,我看到了类似的错误。 具体来说,服务器上的“git pack-objects”进程占用了大量的内存和处理器时间。
解决scheme似乎包括重新包装服务器上的存储库:
git repack -a -d -f --window-memory 10m --max-pack-size 20m
或者调整服务器上的Gitconfiguration以减less内存使用情况,例如:
git config pack.windowMemory 10m git config pack.packSizeLimit 20m
您可能需要使用10m和20m值,具体取决于可用的内存量。