CocoaPods 報(bào)錯(cuò)
[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git
named master
.
You can try adding it manually in ~/.cocoapods/repos
or via pod repo add
.
???
sudo xcode-select -r
用這個(gè)解決
感謝 StackOverFlow:
http://stackoverflow.com/questions/29301785/unable-to-add-a-source-with-url
You may need to reset your command line tools:
sudo xcode-select -r
I was receiving the same error message. Then I noticed, that the wrong Xcode environment was selected (it pointed to an old version which I deleted in the meantime). The command above resets it to the default command line path.
Alternatively you might have no command line tools installed. In that case, download them from the Apple site and install them.
???
原因:master 重復(fù)
最根本的解決方法:1.刪除master(位置: /Users/用戶名/.cocoapods/repos/master)
2.pod setup
3.如果pod setup 不順利
采用:Git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 該過(guò)程作用與 pod setup作用相同