zoukankan      html  css  js  c++  java
  • git_clone资源获取失败解决

    github上克隆一个仓库到本地,一直失败。还以为是git安装问题,卸载重装无效;又换了个大容量的磁盘目录位置;最后ECS系统也重装还是无效。。

    remote: Counting objects: 5148, done.
    remote: Compressing objects: 100% (16/16), 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
    

    然后google了下(为什么我不一开始就搜索。。。想当然瞎折腾)

    原因是要克隆的仓库太大,文件多,导致git clone失败。

    解决:

    • 方法1:增加git缓冲区大小
    git config --global http.postBuffer 524288000
    git config --list
    
    • 方法2:浅层克隆,深度设置为1
    git clone http://github.com/target.git --depth 1  # target.git 为目标地址
    cd target
    git fetch --unshallow
    
  • 相关阅读:
    repo
    manifest
    Gerrit使用简介
    id_rsa id_rsa.pub
    数字签名原理及其应用
    RSA DSA
    ssh(安全协议外壳)
    Numpy基本数据结构
    Numpy
    .bat 批处理
  • 原文地址:https://www.cnblogs.com/sstfy/p/10351801.html
Copyright © 2011-2022 走看看