简体   繁体   中英

Ruby/Github: Appropriate general solution for OpenSSL::SSL::SSLError?

Every now and then I'm encountering problems with scripts hosted on Github which have been linked using https . I've usually managed to get around it one way or the other, but I'm wondering what's the proper way of solving this?

Here's an example: I'd like to make use of this Rails Application template .

Running

rails new APP_NAME -m https://raw.github.com/RailsApps/rails3-application-templates/master/rails3-devise-rspec-cucumber-template.rb -T

will throw:

certificate verify failed (OpenSSL::SSL::SSLError)

What is the proper way of going about this situation without editing the script itself?


UPDATE

I've tried so far as well

export GIT_SSL_NO_VERIFY=true

but I keep on getting the same error.

I also exported the certificate from Firefox as github.com.pem and simply dragged it into my unlocked Keychain Access. The certificate is now listed but the error remains the same.


UPDATE 2

As awful this solution is, this hack works: http://blog.dominicsayers.com/2011/08/16/howto-use-a-rails-template-from-github-on-windows/

It seems that simply "updating" the certificates is the best option:

$ cd /usr/share/curl/
$ sudo wget http://curl.haxx.se/ca/cacert.pem
$ sudo mv curl-ca-bundle.crt old.curl-ca-bundle.crt
$ sudo mv cacert.pem curl-ca-bundle.crt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM