使用git clone命令克隆文件出现error: RPC failed; curl 18 transfer closed with outstanding read data remain问题

最近在使用git clone命令从github克隆源码到电脑时出现了以下问题

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

一、在这里把postBuffer的值配置成500M,对笔者来说已经够了。可以根据你需要下载的文件大小,将postBuffer值配置成合适的大小。

 git config --global http.postBuffer 524288000

这样已经配置好了,如果你不确定,可以根据以下命令查看postBuffer。

 git config --list

二、少clone一些,–depth 1

git clone https://github.com/flutter/flutter.git --depth 1

–depth 1的含义是复制深度为1,就是每个文件只取最近一次提交,不是整个历史版本。
三、换协议
clone http方式换成SSH的方式,即 https:// 改为 git://
例如git clone https://github.com/flutter/flutter.git
换成git clone git://github.com/flutter/flutter.git

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值