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

昨天在執(zhí)行pod update的時候提示如下錯誤

$ pod update BaiduMap-iOS-SDK
Updating local specs repositories
[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

這是因為gitHub對驗證權(quán)限做了調(diào)整引起的,移除了一些低加密標(biāo)準(zhǔn)協(xié)議,相關(guān)內(nèi)容如下:

Weak cryptographic standards removed

February 23, 2018
Earlier today we permanently removed support for the following weak cryptographic standards on github.com and api.github.com:

  • TLSv1/TLSv1.1: This applies to all HTTPS connections, including web, API, and Git connections to https://github.com and https://api.github.com.
  • diffie-hellman-group1-sha1: This applies to all SSH connections to github.com
  • diffie-hellman-group14-sha1: This applies to all SSH connections to github.com

This change was originally announced last year, with the final timeline for the removal posted three weeks ago. If you run into any issues or have any questions, please don’t hesitate to let us know.

解決這個問題需要更新opensll、ruby、cocoapod。

stackoverflow上提供了解決方案

$ 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.1.0
  2.1.1
  2.1.2
:

$ 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.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

$ gem install cocoapods -n /usr/local/bin

$ which pod
/usr/local/bin/pod

$ pod --version
1.4.0

cocoapod升級到1.4.0,然后就可以自行pod update

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Ruby 安裝 要安裝cocospods 首先需要安裝ruby,可以先安裝xcode,再安裝macport ,最后...
    山天大畜閱讀 2,136評論 0 1
  • 一. CocoaPods的介紹 什么是CocoaPods?CocoaPods是一個負(fù)責(zé)管理iOS項目中第三方開源庫...
    輝712閱讀 4,117評論 0 7
  • 項目組件化、平臺化是技術(shù)公司的共同目標(biāo),越來越多的技術(shù)公司推崇使用pod管理第三方庫以及私有組件,一方面使項目架構(gòu)...
    swu_luo閱讀 22,871評論 0 39
  • 王國已覆,天下誰可亡逆賊? 傾世傾城,一曲后庭花娓娓。 知是落魄日臣死,天狗西墜。 已無公道,滿城遍地民哀苦,此狀...
    坦蕩馬閱讀 238評論 0 0
  • 夏天就要過去了 馬上就要去學(xué)校上大一了 與男朋友分手 因為我們年紀(jì)相差太大 沒有人愛 但是我卻不想墮落 因為沒有人...
    鐘情閱讀 338評論 0 1

友情鏈接更多精彩內(nèi)容