解决方案:

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. node-gyp 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。

    在此解决方案中一次生成一个项目.若要启用并行生成,请添加“/m”开关. MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”.要解决此问题, ...

  2. 2019南昌网络赛I:Yukino With Subinterval(CDQ) (树状数组套主席树)

    题意:询问区间有多少个连续的段,而且这段的颜色在[L,R]才算贡献,每段贡献是1. 有单点修改和区间查询. 思路:46min交了第一发树套树,T了. 稍加优化多交几次就过了. 不难想到,除了L这个点, ...

  3. opencart 3伪静态seo url设置教程

    opencart 3已经为我们做好了url伪静态功能,我们只要做一些简单的设置就能实现seo url,首先开启伪静态功能,看看文件.htaccess事发后有存在如下规则,如果没有需要先添加下面的代码 ...

  4. 【myBatis】It's likely that neither a Result Type nor a Result Map was specified.

    因为mapper.xml里把resultType写成了parameterType

  5. yarn rest api未授权漏洞

    项目集群之前在yarn8088的web资源管理页面上看到一堆莫名的定时任务,就是黑客利用漏洞挖矿,最后禁用了8088端口. freebuff传送门: https://www.freebuf.com/v ...

  6. org.apache.hadoop.util.Shell demo/例子

    package cn.shell; import java.io.IOException; import org.apache.hadoop.util.Shell; public class Shel ...

  7. 从rpm包提取rpm spec 的几种方法

    包含了源码包 先安装,然后在rpmbuild 目录直接可以查看文件 不用安装 ,使用rpm2cpio rpm2cpio myrpm.src.rpm | cpio -civ '*.spec' 没有源码 ...

  8. plv8 中使用 eval 函数执行表达式计算

    在js 开发中我们都说eval 函数是邪恶的,但是此函数也有好多妙用,以下是几个简单的案例 eval 执行基于js 的表达式计算 比如我们有以下表 CREATE TABLE rules (    id ...

  9. java 压缩图片(只缩小体积,不更改图片尺寸)

      1.情景展示 在调用腾讯身份证OCR接口的时候,由于要求图片大小只能限制在1MB以内,这样,就必须使用到图片压缩技术 2.代码展示 /** * 图片处理工具类 * @explain * @auth ...

  10. 用简单的JS代码制作计算器

    代码+注释一共不到200行,是练习交流的必备良药 主界面如下: 操作示意图: 以下是代码部分 HTML: <div> <table class="window"& ...