問題一:CocoaPods升級到1.8.4版本後,pod search 查詢1個庫的版本的時候報錯如下:
[!] CDN: trunk URL couldn’t be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/3/9/b/PulseReactiveC/3.1.1/PulseReactiveC.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for “raw.githubusercontent.com” port 443)
解決方案:執行 pod repo remove trunk 命令,移除掉trunk源就行了
問題二:CocoaPods升級到1.8.4版本後,pod install 安裝庫的版本的時候報錯如下:
[!] CDN: trunk Repo update failed - 26 error(s):
CDN: trunk URL couldn’t be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/9/2/f/JCore/1.0.0/JCore.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for “raw.githubusercontent.com” port 443)
解決方案: podfile文件中指定source源爲master,因爲默認的是trunk源,,修改後pod install和pod update就可以正常操作,設置方法如下圖所示。
source 'https://github.com/CocoaPods/Specs.git'