travis-ci / travis-deploy

[DEPRECATED] Travis Deploy tool
MIT License
10 stars 10 forks source link

Not working on windows #7

Closed ForbesLindesay closed 11 years ago

ForbesLindesay commented 12 years ago

I get the following when running travis encrypt ForbesLindesay/component-website MY_SECRET_ENV=super_secret

About to encrypt 'MY_SECRET_ENV=super_secret' for 'ForbesLindesay/component-website'

C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:678:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:678:in `block in connect'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:678:in `connect'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:626:in `start'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:1168:in `request'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli/secure_key.rb:35:in `fetch_key'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli/secure_key.rb:24:in `key'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli/secure_key.rb:20:in `encrypt'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli.rb:41:in `encrypt'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/bin/travis:11:in `<top (required)>'
   from C:/Program Files (x86)/ruby-1.9.3/bin/travis:19:in `load'
   from C:/Program Files (x86)/ruby-1.9.3/bin/travis:19:in `<main>'
drogus commented 12 years ago

Please see this instructions: https://gist.github.com/867550, it fixes ruby on windows to pick up certs properly.

ForbesLindesay commented 12 years ago

That works, would be great if something could be included to do this for you/work around the issue somehow.

sarahhodne commented 12 years ago

We could probably include the instructions in a post-install message for the gem. I'm generally :-1: when it comes to automatically preinstalling certificates on a user's machine, as that partially bypasses the reason for certificates.

ForbesLindesay commented 12 years ago

Could you directly include the certificate of travis-ci in the gem?

drogus commented 12 years ago

@ForbesLindesay yes, we could do that. I don't like such approach, as this is just hiding the problem, which should be solved in rubies released for windows, so people can use any library that actually verifies SSL, but on the other hand probably a lot of people use ruby just for travis, so it's missing my point. Also, ruby experience on windows is already quite bad.

I'm starting to think that including certs, but using them only if system ones are not available will be actually the best way to handle this.

/cc @rkh @svenfuchs

svenfuchs commented 12 years ago

Umm, no idea, sorry. i guess @roidrage and @rkh might be the best people to ask :)

drogus commented 12 years ago

I implemented this here: 50c67ca7bb18529990bc0756165d5035b2836709. I'm not sure if there is easy way to check if actually cert file is available, so I just check for platform.

Could anyone with access to windows check if it fixes the issue?