cocoaPod 更换镜像源

pod install那龟爬速度难以承受,于是想起更换一下镜像源。

在网上查到的命令大体如下:

pod repo remove master

pod repo add master 镜像源地址

pod setup

但是每次执行  “pod repo add master  https://gitcafe.com/akuandev/Specs.git”

都提示 “To setup the master specs repo, please run `pod setup`.”

没办法只能执行 ‘pod setup’ 

#########################

Setting up CocoaPods master repo

  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master

  --progress

  Cloning into 'master'...

########################

啥?不是更换镜像源了吗,怎么还是从 github上clone,坑啊。

我觉得这中间有点问题,很有可能镜像源没有更换成功。于是我输入命令:

"pod repo add test  https://gitcafe.com/akuandev/Specs.git"

提示如下:

#############################

[!] /usr/local/bin/git clone https://gitcafe.com/akuandev/Specs.git test

Cloning into 'test'...

fatal: unable to access 'https://gitcafe.com/akuandev/Specs.git/': SSL certificate problem: Invalid certificate chain

###########################

原来没有权限,所以添加镜像源失败了,由此推导出 “pod repo add master  https://gitcafe.com/akuandev/Specs.git”

也执行失败了,只是没有提示错误信息。你在执行'pod setup'的时候 pod就会使用默认源。

原文地址:https://www.cnblogs.com/TengSys/p/6610513.html