pod install出现问题 You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

[!] Unable to add a source with url `https://git.coding.net/CocoaPods/Specs.git` named `coding-cocoapods-specs`.

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

网上说,这样子解决(我肯定不会这么暴力,直接进入那个目录,把master move到别处,万一出问题还可以恢复):

  1. sudo rm -fr ~/.cocoapods/repos/master
  2. pod setup

仍然慢的不行(可能是我没有翻墙的原因,按说不用翻墙啊,我用的淘宝的镜像-好像换cocoachina维护了),卡在:Setting up CocoaPods master repo

什么原因呢,打开日志看看具体信息

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 master
  Cloning into 'master'...
这下好办了,原来它在下载东西啊,我们完全可以自己替它现在好,放到它想要的位置,不过我们不要忘记它是个git管理的东西,我们还得把我们自己创建的那个目录git化:
# 解压zip,放入~/.cocoapods/repos/,改名为master
git init
git remote add origin https://github.com/CocoaPods/Specs.git
git remote -v #和git clone没啥区别了
再次更新,又卡住了
pod update --verbose
Update all pods
Preparing
Updating local specs repositories
Updating spec repo `master`
实在恶心,能不能跳过Updating spec repo master呢,一般都是可以的了:
pod update --verbose --no-repo-update

万事大吉,pod工程跑起来了。
回过头来想一想,也许一开始就执行最后这个命令没准也可以哈!

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值