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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容