git pull 失败并出现以下错误
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
任何想法如何成功 pull ?
最佳答案
以remote
开头的行是在远程系统上运行的git 的输出。错误:
fatal: unable to create thread: Resource temporarily unavailable
...强烈建议您已经用完服务器上的内存,如果您有以下任一情况,则可能会发生这种情况:
- 包含大量大文件的存储库,这可能导致重新打包占用大量内存。
- 有限的虚拟内存 - 一般情况下,或由于
ulimit
设置而仅针对该帐户
一个建议here是通过登录远程系统(作为 git 运行的用户)并执行以下操作来限制打包可能占用的内存量:
git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1"
关于Git pull 失败并出现错误的包头错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7362709/