我从一个git repo克隆一个项目,但当我执行pod安装时,我看到的第一行是“设置CocoaPods主repo”,之后我看不到任何更多的东西,控制台停在那里。

我不知道发生了什么。有人知道这里发生了什么吗?CocoaPods为何止步于此?


当前回答

我也遇到过同样的问题,但是很有效。我在3小时前执行了Pod安装命令,之后它更新了我想要的。 你只需要继续跟踪“活动监视器”,你可以在磁盘选项卡中看到他们的“git远程https”或“git”。它将下载大约330 Mb,然后显示1gb,几分钟后,它将开始安装。无需执行额外命令。

注意:在下载过程中,你的MAC需要连续处于活动模式。如果你的系统进入睡眠模式,那么CPU会停止进程,你会得到一个像手动添加的错误。

其他回答

我尝试了什么,比克隆回购更快:

舱设置 创建主目录后按Ctrl +C 从https://github.com/CocoaPods/Specs master下载。zip 将内容复制到~/.cocoapods/repos Pod安装-no-repo-update在我的项目文件夹

在那之后,我终于可以看到吊舱正在安装

好运!

编辑:zip大小为144 MB(2017年7月6日)

您将不得不删除回购并重新设置它…

pod repo remove master
pod setup

从cocoapods 1.7.2开始,你可以使用cdn而不是github。它燃烧得很快,挂不起来。从cocopods 1.8.0开始,cdn是默认的。

To use the CDN source in your Podfile: If you don't have private specs: source 'https://cdn.cocoapods.org/' If you have private specs: source 'https://github.com/artsy/Specs.git' - source 'https://github.com/CocoaPods/Specs.git' + source 'https://cdn.cocoapods.org/' Doing this will break your Podfile.lock, so you are likely to need to run pod update to see the changes (be careful, this may update your Pods also). If you have a CI setup, it is recommended to cache the new repo dir as it is very small and would save even more time. With 1.7.2 it should be located at ~/.cocoapods/repos/cocoapods- (yes, with a -), but we're looking to improve the naming in an upcoming release.

更多信息:

CocoaPods 1.7.2 -主Repo CDN完成! CocoaPods 1.8测试版来了!

当CocoaPods这样做的时候,它会下载整个specs repo到~/. CocoaPods。这可能需要一段时间,这取决于您的连接。我会试着先用pod设置明确地做它

当你第一次运行它时,Pod安装或Pod安装会获取整个历史记录。你不需要那个提交历史。

pod setup
Ctrl +C
cd ~/.cocoapods/repos 
git clone --depth 1 https://github.com/CocoaPods/Specs.git master

在良好的网络连接(4Mbps)下,大约需要2分钟。主目录大约519M大。