edgecase / ghpreview

Preview Markdown files (such as a README) exactly how it will appear on Github
MIT License
27 stars 4 forks source link

SSL certificate verify failed #1

Closed bostonaholic closed 11 years ago

bostonaholic commented 11 years ago
$ my-project git:(master) ghpreview README.md 
/Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:799:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:799:in `block in connect'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:799:in `connect'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744:in `start'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:306:in `open_http'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:775:in `buffer_open'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:201:in `catch'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:201:in `open_loop'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:146:in `open_uri'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:677:in `open'
    from /Users/matthew/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:685:in `read'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/gems/ghpreview-0.0.1/lib/ghpreview/previewer.rb:49:in `generate_template_with_fingerprinted_stylesheet_links'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/gems/ghpreview-0.0.1/lib/ghpreview/previewer.rb:17:in `initialize'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/gems/ghpreview-0.0.1/bin/ghpreview:17:in `new'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/gems/ghpreview-0.0.1/bin/ghpreview:17:in `<top (required)>'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/bin/ghpreview:19:in `load'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/bin/ghpreview:19:in `<main>'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/matthew/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
adamlogic commented 11 years ago

Fixed in 3b191c8fe03d821184955276e7d68124d1f49b5d

saudet commented 10 years ago

This issue has recently reappeared for me with version 0.1.1. FYI, the following change at line 12 of the wrapper.rb file fixes this in my case:

      http = HTTPClient.new
      http.ssl_config.ssl_version = :TLSv1