Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to connect to GitHub" error misleading, should print full error #7447

Open
lilyball opened this issue Feb 22, 2018 · 54 comments

Comments

Projects
None yet
@lilyball
Copy link

commented Feb 22, 2018

Report

(note: this actually happened to a friend of mine, I'm just submitting the issue on their behalf)

What did you do?

Run pod repo update

What did you expect to happen?

It should have updated the master repo (I only have the one default spec repo).

What happened instead?

It printed an error

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

The problem with this is it actually did connect to GitHub just fine and updated the repo just fine. I can see that with the --verbose flag. Furthermore, deleting the repo and re-running pod setup also clones it just fine.

After some digging it turns out that it's not a git command failing at all. It's the modified_since_commit() call, which is doing a GET request to https://api.github.com/repos/CocoaPods/Specs/commits/master. This request must be failing somehow, but CocoaPods is catching the error and just printing a generic message.

There's two things that should be corrected here:

  1. The message is wrong. GitHub is not down, and I connected to it just fine. I know this because the git fetch origin call worked just fine. This is a subsequent REST call that failed. I'm not quite sure how to adjust the error message for this, but I do know if the git command succeeded, then the subsequent GET failed, we shouldn't be telling the user that GitHub is down.
  2. The actual error in question should be printed (at least if --verbose is specified). Ideally it would even be inspected to determine the appropriate error message to print based on what error it is, but at the very least, the error surely contains useful information about what actually happened.

CocoaPods Environment

Stack

   CocoaPods : 1.4.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.6 (16G1212)
       Xcode : 9.2 (9C40b)
         Git : git version 2.16.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : honeywell-scm-granite_apps-ios-granite-podspecs - <sanitized URL> @ 077ebca2d8069f8386ac134a7d7bf760dfa5bb2a
               honeywell-scm-maca-ios-maca-podspecs - <sanitized URL> @ de8a142f94da57cee92cf6c89e9368ba26080b13
               master - https://github.com/CocoaPods/Specs.git @ a52f51141dd8222e5816978aaacbcb826fd97623

Installation Source

Executable Path: /usr/local/Cellar/cocoapods/1.4.0/libexec/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

Podfile

Sanitized

@lilyball

This comment has been minimized.

Copy link
Author

commented Feb 22, 2018

Ok I have to backtrack slightly. After looking at my friend's output again, the git succeeded against a different spec repo. The error with the master repo happens before trying to run git. So my complaint about "GitHub is down" isn't actually accurate. But it's still probably wrong, and definitely not very helpful.

If you want to assert that GitHub is down, you should do so only after looking at the error and verifying that it corresponds with a "failed to connect" error. And even then you should offer the suggestion that a network proxy could be interfering.

@lilyball

This comment has been minimized.

Copy link
Author

commented Feb 22, 2018

I also have to wonder if maybe getting an error trying to hit GitHub's API should just result in treating the repo as potentially-modified anyway, so that way the git command would be the source of truth for whether GitHub really is accessible or not. It could still print a warning saying that an error occurred accessing the GitHub API, but it doesn't need to be a fatal error.

@lilyball

This comment has been minimized.

Copy link
Author

commented Feb 22, 2018

The line of code in question for the error is cocoapods-core/github.rb:105.

@StephenStrickland

This comment has been minimized.

Copy link

commented Feb 22, 2018

Specifically this call is failing at /lib/cocoapods-core/github.rb:108 in GitHub.modified_since_commit(url, commit)

@StephenStrickland

This comment has been minimized.

Copy link

commented Feb 22, 2018

The exception message that I get is SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version, maybe this is related somehow to GitHub recently switching to supporting on TLS v1.2? see: https://githubengineering.com/crypto-removal-notice/ and https://twitter.com/grantaholliday/status/966757304640028672

@lilyball

This comment has been minimized.

Copy link
Author

commented Feb 22, 2018

If this is a TLS issue, why am I not replicating it on my own setup? It looks like 'rest' is a built-in library, not a gem, and I'm running the exact same version of Ruby (on the same version of macOS) as my friend is. The only difference is my friend is using the system-provided Ruby whereas I'm using the same version installed from MacPorts (because my system rubygems got screwed up due to bad advice on how to update it). Here's my own pod env:

Stack

   CocoaPods : 1.4.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin16]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.6 (16G1212)
       Xcode : 9.2 (9C40b)
         Git : git version 2.14.3 (Apple Git-98)
Ruby lib dir : /opt/local/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 74be351eeddfe2281cf1986c85278c9c9e051ab4

Installation Source

Executable Path: /opt/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0
@segiddins

This comment has been minimized.

Copy link
Member

commented Feb 22, 2018

We treat that as an error to avoid hammering githubs servers, but I agree that printing out (some of) the underlying error would be helpful, if anyone wants to submit a PR that does that.

@SSheldon

This comment has been minimized.

Copy link

commented Feb 22, 2018

why am I not replicating it on my own setup?

To repro this, you'll need to be using the system ruby on macOS Sierra: rubygems/rubygems#1912 (comment)

Running /usr/bin/gem on macOS will use Apple's Ruby 2.0.0 linked to their old OpenSSL 0.9.8, which will fail with servers supporting only TLS 1.2.

@SSheldon

This comment has been minimized.

Copy link

commented Feb 23, 2018

For anyone encountering this error, you can fix it by updating to High Sierra or installing Ruby via Homebrew :)

@lilyball

This comment has been minimized.

Copy link
Author

commented Feb 23, 2018

Or via MacPorts

@ShonFrazier

This comment has been minimized.

Copy link

commented Feb 23, 2018

Co-worker with Ruby installed via RVM, and CocoaPods installed via gem never experienced the error. Followed his example and the error evaporates.

@janderson-primary

This comment has been minimized.

Copy link

commented Feb 23, 2018

If you're trying to fix a broken Travis build and you're seeing this error, try this fix in your .travis.yml file:

osx_image: xcode9.3beta

that should run your build on 10.13 (High Sierra) and as @SSheldon pointed out, fixes this issue.

@fungilation

This comment has been minimized.

Copy link

commented Feb 24, 2018

Reporting that since a few days ago, pod update started failing on me:

$ pod update --verbose
Update all pods
  Preparing

Updating local specs repositories

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

/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.4.0/lib/cocoapods-core/github.rb:105:in `rescue in modified_since_commit'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.4.0/lib/cocoapods-core/github.rb:100:in `modified_since_commit'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.4.0/lib/cocoapods-core/source.rb:445:in `unchanged_github_repo?'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.4.0/lib/cocoapods-core/source.rb:334:in `update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/sources_manager.rb:88:in `block (2 levels) in update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/sources_manager.rb:87:in `block in update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/sources_manager.rb:86:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/sources_manager.rb:86:in `update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:247:in `block in update_repositories'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:245:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/analyzer.rb:245:in `update_repositories'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:116:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/command/update.rb:81:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.4.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
@sacOO7

This comment has been minimized.

Copy link

commented Feb 24, 2018

This is the same error I am getting right now. I am not sure about the problem. Deleting and reinstalling repo. not solving the problem.

@fungilation

This comment has been minimized.

Copy link

commented Feb 24, 2018

I confirm fix by upgrading from system Ruby (2.0 on MacOS Sierra - 10.12.6). I used brew install ruby, and made sure the installed binary under /usr/local/bin takes precedent over system's at /usr/bin (confirm by ruby --version). Latest ruby from brew is 2.5. As others have said, ruby 2.0 from MacOS default was the culprit.

+1 to original issue here of better debug output on what the cause of "Failed to connect to GitHub" is. As is evident, it wasn't network issue connecting to github but something else.

FYI, I had cocoapod at 1.2.1 before trying again after upgrade to 1.4.0. There's no difference in result or debug output between the 2 cocoapod versions.

@sacOO7

This comment has been minimized.

Copy link

commented Feb 24, 2018

I was able to solve it by installing latest version of ruby. Thank you 👍

@dnkoutso dnkoutso closed this Feb 24, 2018

@dnkoutso dnkoutso reopened this Feb 24, 2018

@dnkoutso

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2018

oops misclicked.

@zhangx-cn

This comment has been minimized.

Copy link

commented Feb 25, 2018

MacOS Sierra - 10.12.6:
i fixed it by:
brew install ruby
sudo gem install cocoapods

@hemangshah

This comment has been minimized.

Copy link

commented Feb 26, 2018

It's still not working for me. Getting this error:

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

I have,

MacOS Sierra: 10.12.6 (16G29)
CocoaPods: 1.4.0
Ruby: 2.4.0

Any solution?

@przala

This comment has been minimized.

Copy link

commented Feb 26, 2018

@hemangshah
can you try with Ruby: 2.5
i have same configuration & works for me after update Ruby..

@ggreco

This comment has been minimized.

Copy link

commented Feb 26, 2018

It works with ruby 2.5, but the error message is plain wrong, lost two hours for a 'pod outdated'...

@hemangshah

This comment has been minimized.

Copy link

commented Feb 27, 2018

@przala and @ggreco - what's the exact solution then?

@fungilation

This comment has been minimized.

Copy link

commented Feb 27, 2018

Read my comment

@FransGH

This comment has been minimized.

Copy link

commented Feb 28, 2018

Ruby update on Sierra doesn't seem to resolve this:

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1212

$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
$ pod --version
1.4.0

$pod update
Update all pods
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

@8of

This comment has been minimized.

Copy link

commented Feb 28, 2018

Well, turns out if you are using homebrew to install ruby via rbenv, then homebrew will not use installed from rbenv version of ruby and will use systems' ruby instead.

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G1212

$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
$ pod --version
1.4.0

$openssl version
OpenSSL 1.0.2n  7 Dec 2017

$ ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
OpenSSL 1.0.2n  7 Dec 2017

$pod update
Update all pods
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

Hmm..

$ pod env
   CocoaPods : 1.4.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
    ...

Well, turns out if you are using homebrew to install ruby via rbenv, then homebrew will not use installed from rbenv version of ruby and will use systems' ruby instead.

Workaround

  • find pod bin (for me it was /usr/local/Cellar/cocoapods/1.4.0/libexec/bin)
  • open it in text editor
  • change path in first line For example:
    Change #!/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
    To #!/Users/YOUR_USERNAME/.rbenv/versions/2.5.0/bin/ruby (I installed v. 2.5.0)
$ pod env
   CocoaPods : 1.4.0
        Ruby : ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
    RubyGems : 2.7.3
    ...

Different rubygems version and pod update works fine now.

Unfortunately the change will not work after updating cocoapods / deleting or changing rbenv's ruby version.

@sheehanm

This comment has been minimized.

Copy link

commented Mar 1, 2018

I got this error and agree with the above point that a better error message could be output. The issue you may be experiencing is that Cocoapods is not using the newer version of Ruby, even if you have it installed (it might still be using an old version). This is how I resolved it. I'm including some extra output in case other users experiencing this issue want to check their settings.

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

I hadn't updated my system in a while so followed the advice to update Ruby.

  1. I got the new version of Ruby via Brew (though I had to update Brew first, which I had to run xcode-select --install first).
  2. Started new Terminal session. Checked Ruby Version.
$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]

Great, I have the new version of Ruby installed. Unfortunately pod update still gave me the issue. I checked what pod was using.

$ pod env
   CocoaPods : 1.0.1
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib

Using the old Ruby version - that's not what I want. Checked what my system was using (sanity check).

$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
$ which ruby
/usr/local/bin/ruby
$ which pod
/usr/local/bin/pod

3 (option 1). Followed advice to install Cocoapods (I specified 1.0.1 because that's what my team must use).
$ gem install cocoapods -v 1.0.1

$ pod env
   CocoaPods : 1.0.1
        Ruby : ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
    RubyGems : 2.7.6
Ruby lib dir : /usr/local/Cellar/ruby/2.5.0_2/lib

That's what I want - it's using the new version of Ruby. I no longer get the issue and pod update works.
I looked at the file at /usr/local/bin/pod to see what changed. The first line had changed from a path to the system Ruby that was version 2.0 to #!/usr/local/opt/ruby/bin/ruby, which is the location of the new version of Ruby.
3 (option 2). Manually modifying the file that runs pod (/usr/local/bin/pod for me) and replacing the old Ruby location line at the top to your new Ruby location should suffice.

Note: I'm on Mac OS X 10.12.6

@segiddins

This comment has been minimized.

Copy link
Member

commented Mar 1, 2018

@segiddins

This comment has been minimized.

Copy link
Member

commented Mar 1, 2018

Something like the following in https://github.com/CocoaPods/Core would probably do the trick:

diff --git a/lib/cocoapods-core/github.rb b/lib/cocoapods-core/github.rb
index e936f9eb..fa10a396 100644
--- a/lib/cocoapods-core/github.rb
+++ b/lib/cocoapods-core/github.rb
@@ -93,7 +93,7 @@ module Pod
       request_url = "https://api.github.com/repos/#{repo_id}/commits/master"
       headers = {
         'User-Agent' => 'CocoaPods',
-        'Accept' => 'application/vnd.github.chitauri-preview+sha',
+        'Accept' => 'application/vnd.github.v3.sha',
         'If-None-Match' => %("#{commit}"),
       }
 
@@ -101,6 +101,8 @@ module Pod
         response = REST.get(request_url, headers)
         code = response.status_code
         code != 304
+      rescue OpenSSL::SSL::SSLError => e
+        raise Informative, "Failed to connect to GitHub due to an SSL error:\n\t#{e}\nMake sure your ruby install supports a new enough TLS version.\nSee http://bundler.io/guides/rubygems_tls_ssl_troubleshooting_guide.html#automated-ssl-check for more information."
       rescue
         raise Informative, "Failed to connect to GitHub to update the #{repo_id} specs repo - Please check if you are offline, or that GitHub is down"
       end
@cquant-gravy

This comment has been minimized.

Copy link

commented Mar 1, 2018

Can confirm, updating to ruby 2.5 does fix the issue
check $ pod env to verify which version of ruby your cocoapods install is running on, mine used to say 2.0 even after updating ruby version to 2.5. To update that I had to uninstall cocoapods with $ gem uninstall cocoapods then reinstall using $ gem install cocoapods.

Stack

   CocoaPods : 1.4.0
        Ruby : ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
    RubyGems : 2.7.6
        Host : Mac OS X 10.12.6 (16G1212)
       Xcode : 9.2 (9C40b)
         Git : git version 2.9.3
Ruby lib dir : /usr/local/Cellar/ruby/2.5.0_2/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 22974e61fed3ea1abadc3d6575cfcf56cc1495e7
@nschneble

This comment has been minimized.

Copy link

commented Mar 1, 2018

@8of You are my hero. The million StackOverflow threads that just banged on about "UPDATE RUBY AND COCOAPODS RAWR" led to nothing. You have saved my sanity.

I can handle manually updating Cocoapod's ruby until I upgrade to High Sierra. Thanks again!

(note to others: you still probably need to follow these instructions, but if that doesn't pan out, check pod env and make sure Cocoapods is behaving itself, @8of's comment above)

@dnkoutso dnkoutso referenced this issue Mar 2, 2018

Closed

There was a problem validating the URL #7474

1 of 1 task complete
@priyankamistry09

This comment has been minimized.

Copy link

commented Mar 5, 2018

Even I faced the similar issue after updating ruby to newer version 2.5. I fixed it by upgrading cocoapods to version 1.4.0.

Things that worked for me:

MacOS : 10.12.6
Xcode : 9.2
Ruby : 2.5.0p0 (2017-12-25 revision 61468)
Cocoapods : 1.4.0

@OlegKasarin

This comment has been minimized.

Copy link

commented Mar 5, 2018

@xie244135119

This comment has been minimized.

Copy link

commented Mar 6, 2018

use the rvm update newest ruby (my ruby version is 2.4.0)。then 'pod repo update' try it again . if there is a problem ((Gem::GemNotFoundException)) , update the cocoapods ('sudo gem install -n /usr/local/bin cocoapods') , it can be ok

@xfdev

This comment has been minimized.

Copy link

commented Mar 8, 2018

This solves my problem: https://stackoverflow.com/a/48962041

@WilliamCocker

This comment has been minimized.

Copy link

commented Mar 11, 2018

Wow thanks everyone, I'm still using Sierra with Xcode 9.2 and this error was really not obvious to debug as it only appeared when updating pods, not when installing them.

So updating Ruby and reinstalling cocoapods did it for me as well.

@gdahilig

This comment has been minimized.

Copy link

commented Mar 13, 2018

Updating ruby and cocopods solves my issue. Thanks all for the help!

@supreetuf

This comment has been minimized.

Copy link

commented Mar 14, 2018

Faced the similar issue. Updated ruby to 2.5 and reinstalled cocoapods, that worked for me. Thanks @sheehanm

@a-lebedev

This comment has been minimized.

Copy link

commented Apr 11, 2018

had similar problem, i've updated ruby through homebrew and exec "bundle install" in the root of project

@JanzTam

This comment has been minimized.

Copy link

commented May 9, 2018

I tried all the way. It dosen't worked for me.

   CocoaPods : 1.5.0
        Ruby : ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
    RubyGems : 2.7.6
        Host : Mac OS X 10.13.4 (17E202)
       Xcode :  ()
         Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /Users/JanzTam/.rbenv/versions/2.5.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 6b22328e37c5864836422e645803117f859c3de6

Installation Source

Executable Path: /usr/local/bin/pod
@lianleven

This comment has been minimized.

Copy link

commented May 23, 2018

MacOS Sierra: 10.12.6 (16G29) is not worked, upgrade Mac version is worked.

@M0TRIX

This comment has been minimized.

Copy link

commented Jun 19, 2018

pod repo remove master
pod setup
pod install

@majeedyaseen

This comment has been minimized.

Copy link

commented Jul 17, 2018

updating ruby solved my problem, Thanks :)

@Adobels

This comment has been minimized.

Copy link

commented Jul 18, 2018

I am experiencing the same problem.
My computer is behind a proxy and firewall, the git can communicate only over https protocol and my user account has no admin rights.

I have installed Cocoapods via RubyGems with --user-install argument. I am able to clone any repository hosted on the GitHub with git clone .

My solution is to not use pod update or pod repo update master commands but to use command git pull inside the folder /.cocoapods/repos/master . This will update the cocoa pods master repo with success

pod repo update master --verbose

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

/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/github.rb:105:in `rescue in modified_since_commit'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/github.rb:100:in `modified_since_commit'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source.rb:453:in `unchanged_github_repo?'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source.rb:342:in `update'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/sources_manager.rb:88:in `block (2 levels) in update'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/sources_manager.rb:87:in `block in update'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/sources_manager.rb:86:in `each'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/sources_manager.rb:86:in `update'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/repo/update.rb:23:in `run'
/Users/kowalski/.gem/ruby/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Users/kowalski/.gem/ruby/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/Users/kowalski/.gem/ruby/2.3.0/bin/pod:22:in `load'
/Users/kowalski/.gem/ruby/2.3.0/bin/pod:22:in `<main>'

Stack

   CocoaPods : 1.5.3
        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
    RubyGems : 2.5.2
        Host : Mac OS X 10.13.5 (17F77)
       Xcode : 9.4.1 (9F2000)
         Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 382f17e9f35571d9d6af9a165544ef8a3127e73d

Installation Source

Executable Path: /Users/kowalski/.gem/ruby/2.3.0/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0
@deepkumar18

This comment has been minimized.

Copy link

commented Aug 6, 2018

Using Xcode 9.4
Swift 3
Got Resolved by below methods

brew install ruby
sudo gem install cocoapods

@anhhtz

This comment has been minimized.

Copy link

commented Aug 23, 2018

brew install ruby

sudo gem install cocoapods

pod setup

It's work perfect !

@JanzTam

This comment has been minimized.

Copy link

commented Aug 28, 2018

@anhhtz When i use pod setup, it still show error :
[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

@anhhtz

This comment has been minimized.

Copy link

commented Aug 28, 2018

Github change SSL, upgrade ruby may fix problem.

@sauravmj

This comment has been minimized.

Copy link

commented Feb 20, 2019

Old thread, but it might still help somebody to know that your http(s) proxy could be getting in the way. Try getting a direct connection to the internet in addition to everything suggested here.

@dujiepeng

This comment has been minimized.

Copy link

commented Mar 27, 2019

Github change SSL, upgrade ruby may fix problem.

it's works for me, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.