因为这个问题困扰了很久,现在记录下流程,方便自己和其他遇到同样问题的朋友参考下。
pod错误记录:
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 clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
但是,此时进行pod update,又出现了如下错误:
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
此时,参考这位朋友的文章给我很大启发,大家想看的话点击如下链接:
https://www.jianshu.com/p/63ad42949061
进入正题,我写下我的过程:
我将Xcode退出了!
第一步 $ gem sources -l
结果返回:
*** CURRENT SOURCES ***
https://ruby.taobao.org/
http://rubygems.org
第二步 移除所有Ruby 镜像
$ gem sources --remove https://ruby.taobao.org/
$ gem sources --remove http://rubygems.org
第三步 继续查看镜像,此时为空 $gem sources -l
第四步 添加新镜像
$ gem sources -a https://gems.ruby-china.com/
不放心的可以在这步,继续执行 $ gem sources -l 查看
此时变成这样:
*** CURRENT SOURCES ***
https://gems.ruby-china.com/
第五步 移除master
$ pod repo remove master
第六步 clone master
$ git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
第七步 执行 update , 等待比较长的时间(我等了二十分钟),发现成功了;
$ pod update
如果以上方式不行,可以参考这篇博主的文章:
https://www.cnblogs.com/sundaysme/p/12574429.html
原文:https://www.cnblogs.com/jersycoder/p/13030136.html