Git pull失败,包装包头错误 [英] Git pull fails with bad pack header error
本文介绍了Git pull失败,包装包头错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
git pull失败,出现以下错误:
remote:计数对象:146,完成。
remote:fatal:无法创建线程:资源暂时不可用
错误:git上传包:git-pack-objects死于错误。
致命:git upload-pack:由于远程端可能的资源库损坏而中止。
remote:由于远程端可能存储库损坏而中止。
致命:协议错误:错误的包头
任何想法如何成功拉出?
解决方案
以远程
远程系统。错误:
致命:无法创建线程:资源暂时不可用
...强烈暗示您在服务器上的内存不足,如果您有以下情况,可能会发生这种情况:
- 有大量大文件的存储库,可能导致重新打包占用大量内存。 有限的虚拟内存一般情况下,还是仅限于该帐户,因为
ulimit
设置
A建议此处是限制金额的内存,打包可能需要通过登录到远程系统(作为git运行的用户)并执行:
git config --global pack.windowMemory100m
git config --global pack.packSizeLimit100m
git config --global pack.threads1
git pull fails with following error
remote: Counting objects: 146, done.
remote: fatal: unable to create thread: Resource temporarily unavailable
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
Any Ideas how to pull successfully ?
解决方案
The lines beginning with remote
are output from git running on the remote system. The error:
fatal: unable to create thread: Resource temporarily unavailable
... strongly suggests that you've run out of memory on the server, which can happen if you have either:
- A repository with lots of large files, which can cause re-packing to take a lot of memory.
- Limited virtual memory - either in general, or just for that account due to the
ulimit
setting
A suggestion here is to limit the amount of memory that packing may take by logging into the remote system (as the user that git runs as) and doing:
git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1"
这篇关于Git pull失败,包装包头错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文