美文网首页
CDN: trunk Repo update failed/po

CDN: trunk Repo update failed/po

作者: 请不要念出我的名字 | 来源:发表于2020-05-15 17:11 被阅读0次

pod 版本是1.8.4,执行pod install 的时候报错:

如图所示在Podfile文件里添加源:
source 'https://github.com/CocoaPods/Specs.git'

添加源

执行命令
pod install

然后会非常非常慢,翻墙之后也慢。看自己的情况吧。
如果执行完成之后还是报错,尝试下面的方法:

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

1.png

如果还是不行的话,可以使用下面的方法
CocoaPods 1.8将CDN切换为默认的spec repo源是trunk源,podfile文件中一定要指定master源。

下面摘自 清华大学开源软件镜像站

新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以:
$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
最后进入自己的工程,在自己工程的podFile第一行加上:
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
完事之后记得remove trunk ,执行下面的命令
pod repo remove trunk

相关文章

网友评论

      本文标题:CDN: trunk Repo update failed/po

      本文链接:https://www.haomeiwen.com/subject/okqyactx.html