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

编译环境

系统版本:macOS Sierra 10.12.6

Xcode: v9.2(9C40b)

当我们使用pod update 或者 pod repo update 时,可能会出现 [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down问题

一开始我认为是网络问题,后来频繁的出现我发现是链接github出现了问题。

stackoverflow 我找到了解决办法。

在这里可以看到出现这个问题的原因,以及解决的办法

2018年2月之后,其中一个主要问题是“弱密码标准被删除”。

To solve this, first you need to update openssl, then ruby, then cocoapod.

开始搬运代码

$ which openssl
/usr/bin/openssl $ openssl version
OpenSSL 0.9.8zh 14 Jan 2016 $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $ brew update $ brew install openssl $ brew upgrade openssl `` If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile $ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile $ which openssl
/usr/local/opt/openssl/bin/openssl $ openssl version
OpenSSL 1.0.2n 7 Dec 2017 $ brew install rbenv ruby-build $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
$ source ~/.bash_profile $ rbenv install --list Available versions:
1.8.5-p52
1.8.5-p113
1.8.5-p114
1.8.5-p115
1.8.5-p231
1.8.6
:
2.5.0-rc1
2.5.0
2.6.0-dev
: $ rbenv install 2.5.0 $ rbenv versions
* system (set by /Users/username/.rbenv/version)
2.5.0 $ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16] $ rbenv global 2.5.0 $ rbenv versions
system
* 2.5.0 (set by /Users/username/.rbenv/version) $ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16] $ gem install cocoapods -n /usr/local/bin $ which pod
/usr/local/bin/pod $ pod --version
1.4.0

成功走到最后,则代表安装成功了,可以放心的 pod updatepod repo update

Ruby选择的版本必须是大于2.0.0版本,最好是选择最新的例如 2.5.0 或者 2.5.1

在 2018.4.24你pod可能更新的是1.5.0版本,这个关系不大

还有一种解决方案 是每次需要更新你的repo时,将老版本的repo删除,重新下载

$sudo rm -fr ~/.cocoapods/repos/master
$pod setup
$pod install

Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down的更多相关文章

  1. 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 ...

  2. Failed to connect to raw.githubusercontent.com port 443: Connection refused

    问题:macOS安装Homebrew时总是报错(Failed to connect to raw.githubusercontent.com port 443: Connection refused) ...

  3. git clone https://github.com/istester/ido.git ,确提示“Failed to connect to 192.168.1.22 port 8080: Connection refused” 的解决办法 。

    不知道是否有同学遇到如下的问题: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo } span.s1 { } git clone ...

  4. mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)

    1.进入终端命令行 (1)输入:cd .ssh/ 进入到.ssh后,输入ls,会输出“known_hosts”,如果没有创建过rsa的话 (2)输入:man ssh-add (3)输入:ssh-key ...

  5. Failed to connect to github.com port 443: Timed out

    Git Clone下载仓库代码的时候,出现以下情况 Failed to connect to github.com port 443: Timed out 解决办法: 输入 git config -- ...

  6. fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to connect to github.com port 443: Timed out

    今天使用git push的时候提示"fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to conne ...

  7. Failed to connect to JobMonApp on port 13491

    今天为了解决别的问题,把/etc/hosts文件里的 127.0.0.1 localhost改成了 127.0.0.1 DSETL ,结果运行作业的时候就报这个错:Failed to connect ...

  8. ambari2.6.50 openssl 版本问题:SSLError: Failed to connect. Please check openssl library versions. Openssl error upon host registration

    I'm trying to register hostnames in Ambari but getting the error below. We tried to run yum update o ...

  9. Failed to connect to 127.0.0.1 port 1080: Connection refused package 问题解决方法

    错误: fatal: unable to access 'https://github.com/******': Failed to connect to 127.0.0.1 port 1080: C ...

随机推荐

  1. Java中Math类的常用方法

    public class MathDemo { public static void main(String args[]){ /** * abs求绝对值 */ System.out.println( ...

  2. LeetCode题型分类及索引

    目录 这是一个对LeetCode题目归类的索引,分类标准参考了July大神的<编程之法>以及LeetCode的tag项.分类可能还不太合理,逐步完善,请见谅~ 题主本人也在一点一点的刷题, ...

  3. Appium+python测试app实例

    Appium和selenium差不到,只是一个用于测web,一个用于测APP.下面记录一下我搭的测试框架,同样是基于PO模式,用的unittest. 最后测试报告如下: 1.1      代码结构 这 ...

  4. python3 常用模块

    一.time与datetime模块 在Python中,通常有这几种方式来表示时间: 时间戳(timestamp):通常来说,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量.我们 ...

  5. First:安装配置JDK and 部署Tomcat

    (一)准备 百度云地址(win,64Bit): 1.tomcat(7.0):链接:https://pan.baidu.com/s/1f60DOGO5Hnj9bq-987FNrw 密码:6q55 2.j ...

  6. api-gateway实践(13)新服务网关 - 断路保护/熔断机制

    参考链接:SpringCloud的Hystrix(五) Hystrix机制 新需求列表 1.在线测试 根据定义,生成输入界面, 点击测试, 验证参数,发起调用,返回执行结果 2.熔断保护 两个实现类: ...

  7. vmvare入门(1)使用移动,不要使用复制

    1.复制虚拟机会产生新的自动网卡,原来的 System Eth0废了? 2.xftp链接的时候,要选择sftp方式连接,utf8编码.

  8. django中图片的上传和显示

    上传图片实际上是 把图片存在服务器的硬盘中,将图片存储的路径存在数据库中. 1 首先要配置文件上传的路径: 1.1 建立静态文件目录 在项目根目录下 新建一个 static文件夹,下面再建立一个med ...

  9. Help Jimmy ~poj-1661 基础DP

    Help Jimmy" 是在下图所示的场景上完成的游戏. 场景中包括多个长度和高度各不相同的平台.地面是最低的平台,高度为零,长度无限. Jimmy老鼠在时刻0从高于所有平台的某处开始下落, ...

  10. kafka_2.12-1.1.0 生产与消费java实现示例

    环境准备: 1)需要在maven工程中引入依赖: <!-- https://mvnrepository.com/artifact/org.apache.kafka/kafka --> &l ...