CocoaPods 报错, && You can try adding it manually in `~/.cocoapods/repos`

CocoaPods 报错

[!] 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
用这个解决
感谢 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 重复
最根本的解决方法:1.删除master(位置: /Users/用户名/.cocoapods/repos/master)
2.pod setup
3.如果pod setup 不顺利
采用:Git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 该过程作用与 pod setup作用相同

http://blog.csdn.net/u010046748/article/details/52681192

你可能感兴趣的:(CocoaPods 报错, && You can try adding it manually in `~/.cocoapods/repos`)