Cocoapods安装时,当执行pod setup,Setting up CocoaPods master repo,可能会卡住不动了,Cocoapods在将它的信息下载到 ~/.cocoapods里(差不多900多兆);如果等了一段时间后提示 Setup completed
的时候,说明已经完成了。
当出现:
Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
或
Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': Operation timed out after 300010 milliseconds with 0 out of 0 bytes received
或
Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': Operation timed out after 300044 milliseconds with 0 out of 0 bytes received
都说明下载出问题了
解决办法一:
需要网络环境较好的情况下重新进行执行set up命令,重新下载;也有网友建议:可以把电脑连上手机热点,再次执行pod setup
,如果家里有矿,这个办法可行?
解决办法二:
根据安装时终端给的提示,手动下载CocoaPods master repo包(下载地址:https://github.com/CocoaPods/Specs.git/)放在`/Users/mac名称/.cocoapods/repos`(mac名称为终端输入:whoami 得到的字符串)下,附错误提示如下:
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `/Users/dfsj/.cocoapods/repos` or via `pod repo add`.
附方法二git下载资源存放文件夹截图