grw*_*grw 15 memory git malloc debian
我正在尝试将大型(1.4GB)Git存储库克隆到具有384MB RAM的32位Debian VM.我正在使用Git 1.7.2.5,并使用SSH协议进行克隆('git clone user@host.com:/ my/repo')
克隆因此消息失败:
remote: Counting objects: 18797, done.
remote: warning: subobtimal pack - out of memory
remote: Compressing objects: 100% (10363/10363), done.
fatal: out of memory, malloc failed (tried to allocate 905574791 bytes)
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
我已经尝试减少Git用于在主机存储库端重新打包并重新打包的内存量:
git config pack.windowMemory 10m
git config pack.packSizeLimit 20m
git repack -a -d
Run Code Online (Sandbox Code Playgroud)
我的问题如下:
在任何一种情况下,我能做些什么来使克隆成功吗?在线的许多潜在解决方案涉及以下部分/全部内容,在这种情况下,这些都不可接受:
提前致谢.
git clone不会查看您的pack.packSizeLimit设置,无论如何它都会将所有内容传输到一个包中 - 除非自上次我查看以来它发生了变化。
使用 SCP 或 Rsync 可能确实是解决您问题的一种方法。删除“无用”的大文件,然后重新打包您尝试克隆的存储库也可能有所帮助。
为虚拟机提供更多 RAM 也可能有所帮助 - 我认为您不需要 64 位地址空间来分配 900MB...您还可以为其提供足够的交换空间来处理 900MB 包,而不是增加 RAM。