CocoaPodsをつかっていて、pod setupの処理が遅い(いつまで経っても終わらない)
不具合再現環境
- CocoaPods 1.1.1
- MacOS 10.11.6 (El Capitan)
再現状況
CocoaPodsのキャッシュをクリア
1 |
$ pod cache clean --all |
ローカルのSpecリポジトリを削除
1 |
$ pod repo remove master |
pod setupを実行
1 |
$ pod setup --verbose |
いつまで経っても終わらない…
解決方法
直接 git clone を実行する。(早く終わるわけではないが進捗が見える)
CocoaPodsのローカルリポジトリフォルダに移動する
1 |
$ cd ~/.cocoapods/repos |
gitで直接取得
1 2 3 4 5 6 7 8 |
$ git clone https://github.com/CocoaPods/Specs.git master Cloning into 'master'... remote: Counting objects: 1028385, done. remote: Compressing objects: 100% (296/296), done. remote: Total 1028385 (delta 119), reused 2 (delta 2), pack-reused 1028075 Receiving objects: 100% (1028385/1028385), 369.57 MiB | 350.00 KiB/s, done. Resolving deltas: 100% (470881/470881), done. Checking out files: 100% (131417/131417), done. |
pod setupを再び実行
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
$ pod setup --verbose Setting up CocoaPods master repo $ /usr/local/bin/git remote set-url origin https://github.com/CocoaPods/Specs.git $ /usr/local/bin/git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. Updating spec repo `master` $ /usr/local/bin/git -C /Users/yoshida/.cocoapods/repos/master pull --ff-only From https://github.com/CocoaPods/Specs 97344fe76c..9d32acd466 master -> origin/master Updating 97344fe76c..9d32acd466 Fast-forward Specs/0/3/5/JustJson/0.1.2/JustJson.podspec.json | 24 ++++++++++ Specs/1/e/f/JFCashier/0.0.1/JFCashier.podspec.json | 22 ++++++++++ *** 中略 *** create mode 100644 Specs/f/6/b/DebugMenuRealmBrowser/0.3.0/DebugMenuRealmBrowser.podspec.json CocoaPods 1.2.0.rc.1 is available. To update use: `gem install cocoapods --pre` [!] This is a test version we'd love you to try. For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.rc.1 Setup completed |