travis.rb: SSL error: could not verify peer
➤ travis report ~/project 1
System
Ruby: Ruby 1.9.3-p194
Operating System: Ubuntu 13.10
RubyGems: RubyGems 1.8.23
CLI
Version: 1.6.3
Plugins: none
Auto-Completion: yes
Last Version Check: 2013-11-27 16:22:08 +0100
Session
API Endpoint: https://api.travis-ci.org/
Logged In: no
Verify SSL: yes
Enterprise: no
Endpoints
org: https://api.travis-ci.org/ (current)
Last Exception
An error occurred running `travis setup`:
Travis::Client::Error: SSL error: could not verify peer
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/client/session.rb:190:in `raw'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/client/session.rb:164:in `get_raw'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/client/session.rb:130:in `config'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/cli/api_command.rb:122:in `load_gh'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/cli/repo_command.rb:76:in `detect_api_endpoint'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/cli/repo_command.rb:19:in `setup'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/cli/command.rb:166:in `execute'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/lib/travis/cli.rb:58:in `run'
from /var/lib/gems/1.9.1/gems/travis-1.6.3/bin/travis:19:in `<top (required)>'
from /usr/local/bin/travis:23:in `load'
from /usr/local/bin/travis:23:in `<main>'
For issues with the command line tool, please visit https://github.com/travis-ci/travis/issues.
For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email support@travis-ci.com.
Same goes for travis login
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 2
- Comments: 56 (15 by maintainers)
Works using
--adapter net-httpoption.travis encrypt "FOO=6\\&a\\(5\\!1Ab\\\\" --adapter net-httpI managed to make
travis encryptwork by changing the ruby library used to connect to the API:https://api.travis-ci.org) and faraday adaptertyphoeus.typhoeus:What happened
all travis commands against my travis ci enterprise failed with error message
SSL error: could not verify peerwhen using option--no-insecure.It works when using arg
--adapter net-http.Problem
The actual difference at SSL/TLS layer when using different faraday adapter is the SSL options. When using default adapter (i.e.,
typhoeus), it explicitly specified CA certs in travis CLI code: https://github.com/travis-ci/travis.rb/blob/c90b1434643c0b63209c7f5f03a749ff445c1501/lib/travis/client/session.rb#L20 while my travis ci enterprise uses cert issued not by the 3 CAs in/assets/cacerts.pemwhich will fail all API requests sent by Travis CI CLI.Proposal
Empty
SSL_OPTIONSwhen using default faraday adapter. It won’t make it less secure but consistent with that in adapternet-http(which is default adapter on Windows platforms)If that’s ok, I’m happy to create a PR.
gem install travis --preshould fix the issue