CocoaPods之[!] Unable to add a source with url https///github.com/CocoaPods/Specs.git named cocoapods. You can try adding it manually in /Users/andylym/.cocoapods/repos or via pod repo add.
本来cocoapods没有问题,可是今天从码云上clone代码,pod install时报错:
[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named cocoapods.
You can try adding it manually in /Users/andylym/.cocoapods/repos or via pod repo add.
解决办法:
cd /Users/andylym/.cocoapods/repos
pod repo add cocoapods github.com/CocoaPods/S…
结果报错:
fatal: unable to access 'github.com/CocoaPods/S…': Failed to connect to github.com port 443 after 14891 ms: Couldn't connect to server
解决办法:
git config --global --unset http.proxy
git config --global --unset https.proxy
接续执行
pod repo add cocoapods github.com/CocoaPods/S…
报错:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 4803 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
解决办法:
git config --global http.postBuffer 124428800
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
接续执行
pod repo add cocoapods github.com/CocoaPods/S…
等待一段时间就可以了