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. php函数var_dump() 、print_r()、echo()

    var_dump() 能打印出类型 print_r() 只能打出值 echo() 是正常输出... 需要精确调试的时候用 var_dump(); 一般查看的时候用 print_r() 另外 , ech ...

  2. JAVA_SE基础——24.面向对象的内存分析

    黑马程序员入学blog ... 接着上一章的代码: //车类 class Car{ //事物的公共属性使用成员变量描述. String name; //名字的属性 String color; //颜色 ...

  3. Win7下安装composer, 并使用其安装smarty

    安装composer需要开启PHP openssl扩展. 1) 先查看PHP是否开启了openssl扩展 键盘win+r 输出cmd, 可以看到Dos窗口, 然后执行php -m (需要添加PHP环境 ...

  4. vue jsx 使用指南

    vue jsx 使用指南 vue jsx 语法与 react jsx 还是有些不一样,在这里记录下. let component = null // if 语句 if (true) { compone ...

  5. javascript实现浏览器窗口大小被改变时触发事件的方法

    转载 当浏览器的窗口大小被改变时触发的事件window.onresize 为事件指定代码: 复制代码代码如下: window.onresize = function(){ } 例如: 浏览器可见区域信 ...

  6. apigw鉴权分析(1-5)亚马逊 - 鉴权分析

    一.访问入口 https://developer.amazon.com/public/zh 二.鉴权方式分析 三.分解结论

  7. Flow简易教程——安装篇

    .mydoc_h1{ margin: 0 0 1em; } .mydoc_h1_a{ color: #2c3e50; text-decoration: none; font-size: 2em; } ...

  8. python基础——匿名函数及递归函数

    python基础--匿名函数及递归函数 1 匿名函数语法 匿名函数lambda x: x * x实际上就是: def f(x): return x * x 关键字lambda表示匿名函数,冒号前面的x ...

  9. python基础—迭代器、生成器

    python基础-迭代器.生成器 1 迭代器定义 迭代的意思是重复做一些事很多次,就像在循环中做的那样. 只要该对象可以实现__iter__方法,就可以进行迭代. 迭代对象调用__iter__方法会返 ...

  10. type="file"实现兼容IE8本地选择图片预览

    一.HTML代码 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Uploa ...