Skip to content

Instantly share code, notes, and snippets.

@jobwat
Created May 20, 2014 06:25
Show Gist options
  • Save jobwat/3dadd176a389ae86b19d to your computer and use it in GitHub Desktop.
Save jobwat/3dadd176a389ae86b19d to your computer and use it in GitHub Desktop.
troubleshooting Travis-CI.org access
# first, log in
bundle exec travis login
# wanna see the token ?
bundle exec travis token
# check that this token tokens
curl -H "Authorization: token $(bundle exec travis token)" https://api.travis-ci.org/users/
# Works ?????
# Now go Ruby
bundle exec pry
require 'travis/pro'
Travis::Pro.access_token = `bundle exec travis token`.chomp
Travis::Pro::User.current
>> Travis::Client::NotLoggedIn: invalid access token
>> from /usr/local/opt/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/travis-1.6.11/lib/travis/client/session.rb:217:in `raw'
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment