[git]error: pack-objects died of signal

13 篇文章 0 订阅
4 篇文章 0 订阅

现象:

git clone 或是 git pull的时候会出错,error 大概如下

remote: Enumerating objects: 7433, done.
remote: Counting objects: 100% (7433/7433), done.
error: pack-objects died of signal 993/3835)   
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: protocol error: bad pack header

 

分析:

因为要clone的代码多达8,  10个G,在加上里面的分支以及历史太多。

因此直接用git clone 命令去克隆的时候经常导致服务端内存爆满,clone不下来。

 

解决方法:

git clone  git@xxx/xxxxxx.git

git clone 不下来,加一个  --depth=1 的参数, 这个参数会只下载最近一次的提交记录。

如果不需要去关注以前的版本,可以只clone最新的版本,使用如下命令:

git clone  --depth=1 git@xxx/xxxxxx.git

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值