问题一:
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git -- master
Cloning into 'master'...
error: RPC failed; curl 56 LibreSSL SSL_read: error:02FFF03C:system library:func(4095):Operation timed out, errno 60
error: 58291 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
解决办法
出现这样的原因是因为电脑安装了两个或两个以上的xcode导致的,或者是之前安装过两个或两个以上的xcode。解决办法是
在终端输入”sudo xcode-select -switch “,然后,打开Xcode—>右键显示包内容,找到Developer文件夹拖到终端里面,回车,再重新执行 pod setup
问题二
在执行 pod install时一直卡在Cloning spec repo 'cocoapods' from 'https://github.com/CocoaPods/Specs.git'
解决办法
- 换国内的源
- 步骤
$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://gitee.com/mirrors/CocoaPods-Specs.git master
- 去 ~/.cocoapods/repos/master/.git 目录下,修改config文件
把 https://gitee.com/mirrors/CocoaPods-Specs.git 替换成 https://github.com/CocoaPods/Specs.git - 然后再 pod istall ;
问题三
Unable to add a source with url https://github.com/CocoaPods/Specs.git
named master
.
You can try adding it manually in /Users/feifan/.cocoapods/repos
or via pod repo add
.
解决办法
1、使用国内源克隆 当然,自己的网速需要扎实,不然速度还是会慢
cd ~/.cocoapods/repos
git clone https://gitee.com/mirrors/CocoaPods-Specs.git master
- 去 ~/.cocoapods/repos/master/.git 目录下,修改config文件
把 https://gitee.com/mirrors/CocoaPods-Specs.git 替换成 https://github.com/CocoaPods/Specs.git
2、另外一个比较靠谱的解决办法:先在git下载到本地,再复制到repos
具体步骤:
- 从https://github.com/CocoaPods/Specs 这个地址上下载master到本地,并解压到 ~/.cocoapods/repos/master文件夹下如下图
- 然后 按照下面步骤 在终端输入命令
1、cd ~/.cocoapods/repos/master
2、git init
3、git remote add origin https://github.com/CocoaPods/Specs.git
问题四
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 7723 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
解决办法
1、先增加缓存 (不够可再加大数值)
git config --global http.postBuffer 524288000
2、第一个方法不行的话,就换国内源
3、以上方法都试了还是不行,就换个好点的网络,比如手机热点等等、、、
(tips:其实2、3都是网络不行,2是源不行,3是自己网络不好)