[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.

有时候,无缘无故的使用cocoapods 的时候,pod install 或者 pod update 的时候,提示

Analyzing dependencies

Cloning spec repo `wackadoo` from `gitATgithub.com:Repo/Repo.git`

[!] Unable to add a source with url `gitATgithub.com:Repo/Repo.git` named `Repo`.

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.  You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

这是什么原因呢?

原因有可能是因为我们装了多个Xcode,或者某次更新的时候,没有处理干净,不要慌,这里介绍一个十分简单,却十分有用的方法,步骤是:

Xcode-->Preferences-->Locations-->Command line tool --> set your Xcode.

然后继续在你的终端重新pod install  或者  pod  update 你会发现,你想要的效果的。

你可能感兴趣的:([!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.)