Git pull 因“错误的包头”而失败

问题描述 投票:0回答:1

当我尝试从远程服务器拉取时,出现此错误:

warning: no common commits
remote: Counting objects: 12358, done.
remote: warning: suboptimal pack - out of memory
error: git upload-pack: git-pack-objects died with error.
remote: Compressing objects:  92% (10914/11863)   fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: fatal: Out of memory, malloc failed (tried to allocate 42679466 bytes)
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

我尝试限制远程服务器上使用的内存每个线程

git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m"
git config --global pack.threads "1" 

我不确定问题到底出在哪里。还有其他想法吗?短暂性脑缺血发作。

git git-pull
1个回答
0
投票

根据

Out of memory, malloc failed (tried to allocate 42679466 bytes)
消息,我猜测您的服务器内存不足。您不是在某些嵌入式/虚拟/其他有限的硬件上运行它吗?

© www.soinside.com 2019 - 2024. All rights reserved.