解决方案:

1、podfile文件中添加source源:
  source 'https://github.com/CocoaPods/Specs.git'

2、执行 pod repo remove trunk 移除trunk源。

问题解决

详细如下:

由于项目是用CocoaPods管理,CocoaPods 1.8将CDN切换为默认的spec repo源,并附带一些增强功能!CDN支持最初是在1.7版本中引入的,最终在1.7.2中完成。 它旨在大大加快初始设置和依赖性分析。

目前项目使用pods的是1.8.4版本

Ribers-Mac:ZNB_Country2.0 Riber$ pod --version
1.8.4

最近使用pods,却出现了一下错误!

[!] CDN: trunk Repo update failed - 17 error(s):
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/1/d/4/CocoaAsyncSocket/0.0.1/CocoaAsyncSocket.podspec.json, error: Operation timed out - SSL_connect
...

按照官方文档 podfile文件中添加source源:
source 'https://github.com/CocoaPods/Specs.git'


podfile文件中添加source源后,pod installpod update可以正常操作,但是pod search有些库却不正常。

Ribers-Mac:ZNB_Country2.0 Riber$ pod search mj
[!] CDN: trunk Repo update failed - 3 error(s):
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/f/b/MJRefresh/0.0.1/MJRefresh.podspec.json, error: Operation timed out - SSL_connect
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/f/b/MJRefresh/1.4.4/MJRefresh.podspec.json, error: Operation timed out - SSL_connect
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/f/b/MJRefresh/2.4.9/MJRefresh.podspec.json, error: Operation timed out - SSL_connect Ribers-Mac:ZNB_Country2.0 Riber$ pod search rbtitle
-> RBTitleView (2.0.1)
简单实用的titleView
pod 'RBTitleView', '~> 2.0.1'
- Homepage: https://github.com/RiberWang/RBTitleDemo
- Source: https://github.com/RiberWang/RBTitleDemo.git
- Versions: 2.0.1, 1.0.1, 1.0.0 [master repo]

解决办法:

1. podfile文件中指定source源为master:

source 'https://github.com/CocoaPods/Specs.git'

2.执行pod repo remove trunk移除trunk源

执行完后,pod search就都正常了!

Ribers-Mac:ZNB_Country2.0 Riber$ pod repo list

master
- Type: git (master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/Riber/.cocoapods/repos/master trunk
- Type: CDN
- URL: https://cdn.cocoapods.org/
- Path: /Users/Riber/.cocoapods/repos/trunk 2 repos
Ribers-Mac:ZNB_Country2.0 Riber$ pod repo remove trunk
Removing spec repo `trunk`
注意:podfile文件中一定要指定master源,因为现在默认是trunk

source 'https://github.com/CocoaPods/Specs.git'

参考文章:
  1. 官方说明(英语不好的同志可在谷歌浏览器中打开使用其翻译功能)
  2. Github Issules

觉得有用的同学点个关注,或者留言评论区,看到邮件提示消息尽快回复。

CDN: trunk Repo update failed - CocoaPods的更多相关文章

  1. CocoaPods 升级1.8.4的坑 CDN: trunk Repo update failed

    之前升级了cocoaPods 版本1.8.4,今天pod install,然后问题就来了: 1.出现了下边的问题: Adding spec repo `trunk` with CDN `https:/ ...

  2. CocoaPods CDN: trunk Repo update failed

    问题 今天升级 CocoaPods 到 1.8.4 版本但是随即问题就来了, 执行 pod install 下载库时,出现错误 解决 在 Podfile 加上 source ‘https://gith ...

  3. Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

    Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offli ...

  4. pod update报错(Cocoapods: Failed to connect to GitHub to update the CocoaPods/Specs specs repo)报错解决方案

    好长一段时间没动pods,今天偶然需要更新一个库,于是执行了下pod update,然后惊悚的出现了这个报错: [!] Failed to connect to GitHub to update th ...

  5. The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

    出现这样的错误: error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your C ...

  6. Proxmox VE中出现TASK ERROR: command 'apt-get update' failed: exit code 100的解决方法

    问题描述: 出现这个错误一般在WEB或者在Proxmox VE的服务器上面能看到日志: PVE中出现TASK ERROR: command 'apt-get update' failed: exit ...

  7. glide install失败 Update failed for golang.org/x/net: Cannot detect VCS

    失败信息: [WARN]    Unable to checkout golang.org/x/net[ERROR]    Update failed for golang.org/x/net: Ca ...

  8. Realm Update failed - Android

    Realm Update failed - Android Ask Question up vote 0 down vote favorite I'm using realm for my andro ...

  9. ubuntu apt update failed to fetch

    When I do command sudo apt update, always get belowing errors: Err:1 http://archive.ubuntu.com/ubunt ...

随机推荐

  1. 数组问题:a与&a有的区别

    int a[5] = {0,1,2,3,4};这种用法还是比较常见的. #include <stdio.h> int main(void) { int a[5] = {0,1,2,3,4} ...

  2. jenkins中 Slave使用Docker

    原因就不说了,网上的自动化测试Docker教程太不靠谱,还是学学官网吧. 目的: 在现在各种虚拟化的大条件下,还在建立N个节点机器或节点机器搞N个并发,是不是太不方便了. 如果一个机器搞N个并发,在自 ...

  3. 修改MyEclipse/Eclipse左侧文字大小(MacOS/Windows)

    一.Windows 首先找到 Eclipse/MyEclipse 的安装目录,然后找到如下目录: \plugins\org.eclipse.ui.themes_1.1.200.v20160815-05 ...

  4. OpenCV 学习笔记(15)openc解帧视频

    1 修改读取视频的地址 2 修改保存图片序列的路径 String videopath = "F:/dongdong/0tool/3D/2模型/相机阵列/1_12cam亿级相机/数据/giga ...

  5. ESA2GJK1DH1K升级篇: 远程升级准备工作: 使用TCP客户端连接Web服务器实现http下载数据

    一,根目录建一个文件 二,使用浏览器访问 http://47.92.31.46:80/1.txt     或者  http://47.92.31.46/1.txt 三,使用TCP客户端访问文件内容 3 ...

  6. NOIP动态规划大合集

    1.前言 NOIP2003-2014动态规划题目大合集,有简单的也有难的(对于我这种动态规划盲当然存在难的),今天就把这些东西归纳一下,做一个比较全面的总结,方便对动态规划有一个更深的理解. 2.NO ...

  7. javascript中的作用域和变量提升

    js的运行主要分两个阶段:js的预解析和运行,预解析阶段所有的变量声明和函数定义都会提前,但是变量的赋值不会提前.

  8. javascript 检测浏览类型和版本

    废话不多说了,直接就上代码吧,因为IE11以后的版本和之前的不一样了,所以有些关键字还需要注意.这里面判断IE的时候需要多注意.function getBrowserInfo(){ var ua = ...

  9. python3.5以上版本,typing模块提高代码健壮性

    一 前言 Python是一门弱类型的语言,很多时候我们可能不清楚函数参数类型或者返回值类型,很有可能导致一些类型没有指定方法,在写完代码一段时间后回过头看代码,很可能忘记了自己写的函数需要传什么参数, ...

  10. docker 挂载主机目录 -v 和 --mount区别

    使用-v  时,如果宿主机上没有这个文件,也会自动创建, 但是如果使用--mount时,宿主机中没有这个文件会报错找不到这个文件,并创建失败