运行pod repo update时,会生成以下错误:
Updating spec repo `master`
[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down使用cocoapods 1.0.1
我也知道这一点:Master spec-repo rate limiting post‑mortem。
向调用添加--verbose标志将显示ruby调用堆栈:
.rvm/gems/ruby-2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/github.rb:100:in `modified_since_commit'
.rvm/gems/ruby-2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/master_source.rb:32:in `requires_update?'
.rvm/gems/ruby-2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/master_source.rb:14:in `update'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:88:in `block (2 levels) in update'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:87:in `block in update'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:86:in `each'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:86:in `update'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/update.rb:23:in `run'
.rvm/gems/ruby-2.3.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
.rvm/gems/ruby-2.3.0/bin/pod:23:in `load'
.rvm/gems/ruby-2.3.0/bin/pod:23:in `<main>'
.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'找不到任何解决此问题的方法,并且无法运行项目。
发布于 2018-02-24 18:56:42
其中一个主要问题是在2018年2月之后“删除了弱加密标准”。
这里有一个注释:https://github.com/blog/2507-weak-cryptographic-standards-removed
要解决这个问题,首先需要更新openssl,然后是ruby,然后是cocoapod。
$ which openssl
/usr/bin/openssl
$ openssl version
OpenSSL 0.9.8zh 14 Jan 2016
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
$ 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.5.1
2.6.0-dev
:
$ rbenv install 2.5.1
$ rbenv versions
* system (set by /Users/username/.rbenv/version)
2.5.1
$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
$ rbenv global 2.5.1
$ rbenv versions
system
* 2.5.1 (set by /Users/username/.rbenv/version)
$ ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]
$ gem install cocoapods -n /usr/local/bin
$ which pod
/usr/local/bin/pod
$ pod --version
1.5.3现在,你可以这样做
$ pod update来源链接:https://qiita.com/satoshi-iwaki/items/ed2c267127dcc80baa21
发布于 2016-08-17 20:04:02
最后通过删除./cocoapods/repos/master并运行pod install解决了这个问题。
更正式的解决方案可能是这样的:
pod repo remove master
pod setup
pod install如果在执行前两个步骤后pod install失败,您可能需要删除Podfile.lock。
我不明白为什么它最初无法连接到Github。
发布于 2017-04-12 09:32:18
您可以尝试这样做:
$sudo rm -fr ~/.cocoapods/repos/master
$pod setup
$pod install但在我的情况下,我必须:
删除
$pod install,然后删除
https://stackoverflow.com/questions/38993527
复制相似问题