Cocoapods : CocoaPods / Specs 사양 저장소를 업데이트하기 위해 GitHub에 연결하지 못했습니다.
실행할 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
코코아 포드 1.0.1 사용
나는 또한 이것을 알고 있습니다 : 사후 스펙 마스터 리포지토리 제한 .
호출에 --verbose 플래그를 추가하면 루비 호출 스택이 표시됩니다.
.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 년 2 월 이후 "약한 암호화 표준이 제거되었습니다"입니다.
여기에 메모 : https://github.com/blog/2507-weak-cryptographic-standards-removed
이를 해결하려면 먼저 openssl을 업데이트 한 다음 루비를 업데이트 한 다음 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.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
Finally managed to solve it by deleting ./cocoapods/repos/master
and running pod install
.
The more formal solution would probably go like this:
pod repo remove master
pod setup
pod install
If pod install
fails after performing the first two steps, you may need to delete your Podfile.lock
.
Why it initially failed to connect to Github is beyond me.
You can try this:
$sudo rm -fr ~/.cocoapods/repos/master
$pod setup
$pod install
but in my case I had to:
delete the Podfile.lock and then
$pod install
A another solution similar to Max's and Adem's in this thread is found in a CocoaPods issue:
brew install ruby
sudo gem install cocoapods
Verify that you're using the latest and correct Ruby with:
ruby --version
which ruby
Should be using /usr/local/bin/ruby
Reason: It turns out that Github updated to only support TLS 1.2 on Feb 22nd. Older versions of MacOS before High Sierra come preinstalled with Ruby 2.0. This version uses OpenSSL 0.9.8 which "will fail with servers supporting only TLS 1.2."
Updating to the latest Ruby (2.5) and latest CocoaPods (1.4) fixed this for me without having to do anything with openssl (Ruby updates openssl). This is a good solution if you don't want to update to High Sierra just yet.
I also encountered the same issue. In my scene, i used a mirror repo (hosted elsewhere) of cocoapods specs on github. When i updated the specs repo, it worked!
cd ~/.cocoapods/repos/master
git pull
This worked like magic
$sudo rm -fr ~/.cocoapods/repos/master
$pod setup
$pod install
Otherwise
$pod setup
Ctrl +C
cd ~/.cocoapods/repos
$git clone --depth 1 https://github.com/CocoaPods/Specs.git master
Just update cocoapods: sudo gem install cocoapods
A slightly simpler solution from Adem's that doesn't use rbenv:
brew install openssl
brew upgrade openssl
brew install ruby
brew link --overwrite ruby
Finally, make sure you don't have your PATH
variable set to have /usr/local/bin
after $PATH
. Your PATH
export in ~/.bash_profile
should look similar to this:
export PATH=/usr/local/bin:$PATH
This worked for me:
- Remove
Podfile.lock
- Run
pod install
If someone has these issues on Circle CI I was struggling with this for a day almost.
In the end I think the best way is to use their provided solution to download from their servers.
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
From this link you can see that one of the cocoapods core contributor says that it's fine: The CocoaPods repo cache is updated roughly every 30 mins, which is usually frequent enough to only miss the last 6 pushes to the Specs repo.
https://discuss.circleci.com/t/best-practice-for-use-of-cached-cocoapods-specs/18897/2
I did next in Terminal:
brew install openssl
if you don't have home brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and repeat p.1
export PATH="/usr/local/opt/openssl/bin:$PATH"
openssl version
Output:OpenSSL 1.0.2n 7 Dec 2017
pod update
I was also facing the same problem. I solved it only by accessing two commands from terminal.
sudo gem uninstall nanaimo
and then
sudo gem install nanaimo
Hope so it will help.
Remove all of cocoapods package. See here for information on how to do this.
Then reinstall cocoapods.
$ sudo gem install cocoapods
For me the below commands fixed the issue
Removing cocoapods from mac
sudo gem uninstall cocoapods
Installing cocoapods on mac
sudo gem install cocoapods
Anyone facing any similar issue where the remote hangs-up prematurely, use ssh
to clone the repo instead.
git clone git@github.com:CocoaPods/Specs.git master.
In order to use SSH to clone a GitHub repo, you need to have a GitHub account and have your SSH keys associated with it.
'development' 카테고리의 다른 글
원형 진행률 표시 줄에서 색상을 변경하는 방법은 무엇입니까? (0) | 2020.06.25 |
---|---|
Visual Studio 코드에서 패널을 오른쪽으로 이동 (0) | 2020.06.25 |
Language.Haskell.Interpreter와 함께 실행 파일을 제공하는 방법은 무엇입니까? (0) | 2020.06.25 |
이 개체 수명 연장 폐쇄는 C # 컴파일러 버그입니까? (0) | 2020.06.25 |
편리한 C ++ 구조체 초기화 (0) | 2020.06.25 |