问题
克隆一个大型仓库,约 270 M
git clone https://xxxxxx.git
,报错:
error: pack-objects died of signal 15, 37.61 MiB | 265.00 KiB/s
remote: aborting due to possible repository corruption on the remote side.
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
Gitea: Internal error
Failed to execute git command: exit status 128
fatal: index-pack failed
解决方案
分步克隆
克隆最新一次 commit
$ git clone https://xxxxxx.git --depth 1
然后下载所有历史
$ git fetch --unshallow
或者克隆剩余所有
$ git remote set-branches origin '*'
$ git fetch -v
或者克隆某一分支
$ git remote set-branches origin 'cnguu'
$ git fetch origin cnguu
$ git checkout cnguu
必须 注册 为本站用户, 登录 后才可以发表评论!