github - git clone 一个比较大的 repo 出错, 纠结我 1 天了, 求助

 hushuoni_133 发布于 2022-10-29 06:31

下面用的是git submodule update, 用git clone ... --recursive问题是一样的

akagi201@akgentoo ~/a20-kernel (master*) $ git config http.postBuffer 5024288000
akagi201@akgentoo ~/a20-kernel (master*) $ git submodule update
Cloning into 'linux-sunxi'...
remote: Counting objects: 4022357, done.
remote: Compressing objects: 100% (682462/682462), done.
error: RPC failed; result=18, HTTP code = 200.31 MiB | 654.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Clone of 'https://github.com/linux-sunxi/linux-sunxi.git' into submodule path 'linux-sunxi' failed
3 个回答
  • RPC failed; result=18, HTTP code = 200 出错的解决方法:
    执行 git repack -a -f -d --window=250 --depth=250 即可。

    如果还是报错则请执行:

    git gc --aggressive
    
    git repack -a -f -d --window=250 --depth=250

    也可以更换为 SSH 地址推送:
    适用于 Coding https://coding.net/help/faq/g...
    适用于 GitHub https://help.github.com/artic...

    2022-10-30 13:16 回答
  • 使用 ssh 协议克隆

    2022-10-30 13:18 回答
  • 不看commit历史的话,可以这样做

    git clone url --depth  1
    
    2022-10-30 13:19 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有