我有一个git存储库驻留在内存有限的服务器上。当我尝试从服务器克隆现有存储库时,我收到以下错误
hemi@ubuntu:$ git clone ssh://hemi@servername.dk/home/hemi/repos/articles
Initialized empty Git repository in /home/hemi/Skrivebord/articles/.git/
hemi@servername.dk's password:
remote: Counting objects: 666, done.
remote: warning: suboptimal pack - out of memory
remote: fatal: Out of memory, malloc failed
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: early EOF
fatal: index-pack failed
hemi@ubuntu:$
为了处理这个错误,我试图重新打包原始存储库(根据此论坛帖子)。但是,它不是重新打包存储库,而是描述了如何使用“git pack-objects”命令。
hemi@servername:~/repos/articles$ git repack -a -d --window-memory 10m --max-pack-size 100m
usage: git pack-objects [{ -q | --progress | --all-progress }]
[--all-progress-implied]
[--max-pack-size=N] [--local] [--incremental]
[--window=N] [--window-memory=N] [--depth=N]
[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]
[--threads=N] [--non-empty] [--revs [--unpacked | --all]*]
[--reflog] [--stdout | base-name] [--include-tag]
[--keep-unreachable | --unpack-unreachable
[<ref-list | <object-list]
Git 1.6.5.7安装在服务器上。
Smart猫小萌
慕码人2483693
MMTTMM