解决方案:

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. Win7下安装openssl

    安装环境: 操作系统:window7(64位) C++编译器:VS2012 -------------------------------------------------------------- ...

  2. dedecms去掉标题长度限制

    dedecms文章标题默认显示字数为60字节(30个汉字),如果想要显示更多要如何操作呢?两步解决问题,随ytkah一起来看看吧.1.后台找到“系统设置-系统基本参数-其他其他选项”(如下图)这时你可 ...

  3. Django Model的外键自关联‘self'和设置'unique_together'

    在django的model定义中,有时需要某个Field引用当前定义的Model,比如一个部门(Department)的Model,它有一个字段是上级部门(super_department),上级部门 ...

  4. application platform as a service (aPaaS)

    Application platform as a service (aPaaS) is a cloud service that provides environments for the deve ...

  5. 【oracle】处理锁表

    查询锁表 select object_name,machine,s.sid,s.serial# from v$locked_object l,dba_objects o ,v$session swhe ...

  6. restQL 微服务查询语言

    restQL 是一个强大的微服务查询语言,类似sql,支持并行.链式.过滤.同时官方也提供了多种语言的实现 而且还有一个manger 与 graphql 以及Falcor的比较 以下是来自官方的比较说 ...

  7. RPKM FPKM TPM RSEM

    RPKM:Reads Per Kilobases Per Million Reads指的是每1百万个reads中比对到每1kb碱基外显子上的reads数 FPKM:Fragments Per Kilo ...

  8. UDF——文件编码造成UDF编译失败

    有时候我们觉得我们的代码写得很正确的,但是在Fluent当中编译的时候一直编译不通过,提示我们错误,我们根据Fluent当中的错误提示去找到源代码中对应的行,却发现没有错误提示当中的问题,出现这个问题 ...

  9. bat 文件追加

    @echo off set str1=disable_modules:set str2= - mine echo %str1% >> c:\minionecho %str2% >&g ...

  10. pytest学习笔记二 fixtrue

    前言 官方文档关于fixture功能的解释如下: The purpose of test fixtures is to provide a fixed baseline upon which test ...