git克隆review.opendev.org上项目出错
需要下载review.opendev.org上的项目。
首先需要一个该站账号,注册。
克隆项目
[root@localhost /]# git clone "ssh://xxx@review.opendev.org:29418/openstack/project" Cloning into 'project'... remote: Counting objects: 3075, done remote: Finding sources: 100% (66857/66857) packet_write_wait: Connection to 199.204.45.33 port 29418: Broken pipe fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed
解决方法:原贴地址
方法一、修改git设置,
将Http缓存设置大一些,比如1G:git config --global http.postBuffer 1048576000,或者3G 3194304000
设置git最低速度
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
原错误没有了,可能会有新错误
方法二、
curl 18 transfer closed with outstanding read data remaining
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
有文章说可能是tag资源太大引起的
可以尝试先浅拷贝,再fetch
git clone --depth=1 http://git地址
git fetch --unshallow
执行git fetch --unshallow时又报了错误,再执行一次git fetch --unshallow就成功了,这个还不清楚怎么回事
方法三:
项目下载下来了,但又有了新问题
只能看到master分支
现象是执行git fetch、git branch -a都只能看到master
参考 ,打开配置项目下文件.git/config,将
[remote "origin"]
url = https://github.com/xxx/project.git
fetch = +refs/heads/master:refs/remotes/origin/master
修改为
[remote "origin"]
url = https://github.com/xxx/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
然后执行git fetch就可以拉下其他分支
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)