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

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


当前回答

我目前使用的是另一种解决方案。通过更改Podfile中的存储库URL为:

source 'https://cdn.cocoapods.org/'

变化:

- source 'https://github.com/CocoaPods/Specs.git'
+ source 'https://cdn.cocoapods.org/'

其他回答

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

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

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

好运!

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

上面的解决方案都不适合我,我不得不卸载coacoapods,然后安装一个特定的版本,然后一切才适合我

sudo gem uninstall cocoapods

然后

sudo gem install cocoapods -v 1.7.5

现在,即使是冗长也显示了进步

$ pod setup --verbose

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
  $ /usr/bin/git clone https://github.com/CocoaPods/Specs.git --progress -- master
  Cloning into 'master'...
  remote: Enumerating objects: 295, done.        
  remote: Counting objects: 100% (295/295), done.        
  remote: Compressing objects: 100% (283/283), done.        
  Receiving objects:  20% (744493/3722462), 132.93 MiB | 567.00 KiB/s   

你可以试着在verbose模式下运行:

pod install --verbose

这将告诉你可可豆荚的作用:

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
  $ /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master
  Cloning into 'master'...

(如此处所示)

对我来说,上面的步骤花了很长时间,因为回购(2016年12月)现在是1.1 GB

我目前使用的是另一种解决方案。通过更改Podfile中的存储库URL为:

source 'https://cdn.cocoapods.org/'

变化:

- source 'https://github.com/CocoaPods/Specs.git'
+ source 'https://cdn.cocoapods.org/'

刚刚安装了主回购,很兴奋地看到我们有一个下载进度,见截图;)

CocoaPods 1.2.0版(1月28日)修复了这个问题,感谢所有贡献者和Danielle Tomlinson。