Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pod install returns fatal error: SSL certificate issue?

I just installed CocoaPods by following these instructions:

Now I opened an Xcode project which has CocoaPods in it, I opened the terminal, went into that project folder and typed "pod install" as required, and I am getting an error back:

$ pod install
Setting up CocoaPods master repo
[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.git' master

Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': SSL certificate problem: Invalid certificate chain

/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:217:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:210:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

I have no idea what this is about. Can someone help me? This is the first time I try to do anything with CocoaPods on OS X Mavericks.

Thanks!

like image 502
Mathieu Avatar asked Jan 05 '14 21:01

Mathieu


2 Answers

Github's SSL certificate looks fine from my end, but maybe you have distrusted it for some reason, or you are using a proxy. To resolve:

Using the Safari browser (not Chrome, Firefox or Opera) on Mac OS X 10.9 (Mavericks) visit https://github.com (no www.).

If an alert pops up, press the "Show Certificate" button, check "Always Trust", and then "Continue."

If no alert pops up, press the green or gray Security button by the URL:

enter image description here

Then make sure "Always trust" is checked on the certificate.

If this doesn't resolve your issue, try temporarily disabling any proxy servers you might be running, such as Charles.

After that, pod install should work.

Note: A portion of my answer text was copied from this answer.

like image 163
Aaron Brager Avatar answered Oct 12 '22 22:10

Aaron Brager


Under the hood pod uses just a regular git, so disabling SSL validation for git will solve the problem:

GIT_SSL_NO_VERIFY=true pod install
like image 42
scope Avatar answered Oct 12 '22 23:10

scope