Help us understand the problem. What is going on with this article?

pod install で Unable to add a source と言われました。

More than 3 years have passed since last update.

ipaのbuild環境を作成しています。新しく作った環境でpod installがうまくいきませんでした。

pod installが失敗

pod install

Updating local specs repositories
Creating shallow clone of spec repo master from https://github.com/CocoaPods/Specs.git
[!] 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.

手動で、pod repoを追加しろとあります。

~/.cocoapods/reposにSpecs.gitをclone

ホームにあるCocoaPodsのディレクトリに、Specs.gitをcloneします。

cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git master

再度pod install

# podのディレクトリに戻る、無くても良い
cd -

# pod installを実行
pod install

今度はうまくいきました(☝ ՞ਊ ՞)

参考

https://github.com/CocoaPods/CocoaPods/issues/4293

pugiemonn
GoogleTagManagerを利用してGAを操るようなマーケターとしてお仕事しています(☝ ՞ਊ ՞)
pugiemonn_com
pugiemonn.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away