Git push - 内存不足,calloc 失败并且包对象因奇怪错误而死亡

标签 git bitbucket

我第一次尝试将我的存储库推送到 bitbucket 时遇到了这个问题:

[~/public_html]# git push -u origin --all
Counting objects: 2170, done.
Delta compression using up to 12 threads.
fatal: Out of memory, calloc failed  
error: pack-objects died with strange error

我在 StackOverflow 上发现了类似的问题,建议使用带有 --window-memory 和 --max-pack-size 的 repack,但我得到了几乎相同的错误:

[~/public_html]# git repack -a -d --window-memory 10m --max-pack-size 10m
Counting objects: 2170, done.
Delta compression using up to 12 threads.
fatal: Out of memory, calloc failed

我的服务器有 4 GB 内存,所以我看不出它是怎么用完的。我没有任何特别大的文件,我的整个存储库只有 12 MB

我已经进行了一些搜索,但找不到任何特别适合我的情况。

这里会发生什么?

最佳答案

看起来您的虚拟主机不允许执行某些内存分配指令。您可能想尝试在关闭 mmap 的情况下编译您自己的 git 版本。

供引用:http://wiki.dreamhost.com/Git#Setup_Two:_More_Thoughtful

关于Git push - 内存不足,calloc 失败并且包对象因奇怪错误而死亡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14851406/

相关文章:

git - Bitbucket 要求输入密码来克隆存储库

git - Bitbucket Cloud 将从 2018 年 12 月 1 日起禁用对 TLSv1 和 TLSv1.1 的支持

node.js - 直接从 Bitbucket 部署到 AWS Elastic Beanstalk

windows - 回滚到以前的版本后获取完整的 git 日志

django - 同一个项目,多个客户 git 工作流程

git - 用于初始化和上传存储库的 Mercurial 操作的 git 等效项是什么?

python - 让 pip 与 git 和 github 存储库一起工作

git - 位桶克隆 : Port number ended with 'T'

java - Intellij + Bitbucket 中的微服务 + 项目

Gitflow + Forking 工作流程(在 Stash 上)?