赞
踩
最近clone公司工程总是遇到以下问题
git clone https://git.xxxxxxxxx
Cloning into 'XXXX-Android'...
remote: Enumerating objects: 5415, done.
remote: Counting objects: 100% (5415/5415), done.
remote: Compressing objects: 100% (614/614), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
根据网上信息来看,主要有以下几个问题:
针对缓存问题,也是网上提及最多的,也就是配置以下内容:
git config --global http.postBuffer 524288000
一般介绍是设置为500M,我直接多加了个0,设置为5G,但还是存在报错
没有找到原理性原因,只是尝试约束了几个参数,就成功了
git clone -b master https://git.xxxxxxxxxxxx --depth 1
-b master
为只拉取主分支内容,可以将master
改为其他分支名称--depth 1
为只拉取最近一次提交的内容btw:只设置了-b master
之后,错误信息减少了,所以进一步设置了depth,还需要深挖原因。
git clone -b master https://git.xxxxxxxxxxxxx
Cloning into 'xxxxxx-Android'...
remote: Enumerating objects: 5415, done.
remote: Counting objects: 100% (5415/5415), done.
remote: Compressing objects: 100% (614/614), done.
fatal: the remote end hung up unexpectedly23 MiB | 1.14 MiB/s
fatal: index-pack failed
该上梯子上梯子,该进内网进内网,网络稳定了,成绩才好,不管是工作还是游戏。。。。
参考:刘大侠GG_B的error: RPC failed; curl 18 transfer closed with outstanding read data remaining的解决
clone 方式换成SSH的方式,即 https
改为 git
例如
git clone https://github.com/flutter/flutter.git
换成
git clone git://github.com/flutter/flutter.git
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。