Skip to content

Instantly share code, notes, and snippets.

@dak
Forked from topheman/jspm.travis.setup.md
Created December 7, 2015 19:25
Show Gist options
  • Save dak/6fc5ebe50f3b7728399b to your computer and use it in GitHub Desktop.
Save dak/6fc5ebe50f3b7728399b to your computer and use it in GitHub Desktop.
Travis setup of Github token for jspm

If you encounter the following:

GitHub rate limit reached. To increase the limit use GitHub authentication.
     Run jspm endpoint config github to set this up.

Sources :

  1. go to https://github.com/settings/tokens

  2. Create a token , label it "Travis"

  3. Copy paste the token

  4. jspm registry config github

You'll be asked for the token

  1. jspm registry export github

outputs:

jspm config registries.github.remote https://github.jspm.io
jspm config registries.github.auth JSPM_GITHUB_AUTH_TOKEN
jspm config registries.github.maxRepoSize 100
jspm config registries.github.handler jspm-github

JSPM_GITHUB_AUTH_TOKEN: unencrypted Base64 encoding of your GitHub username and password or access token

  1. Install travis-cli
$ ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
$ gem install travis -v 1.8.0 --no-rdoc --no-ri
$ travis version
1.8.0
  1. Go to the root of your repo, encrypt the token your JSPM_GITHUB_AUTH_TOKEN
travis encrypt 'JSPM_GITHUB_AUTH_TOKEN=[JSPM_GITHUB_AUTH_TOKEN]'

outputs your ENCRYPTED_STRING

  1. Include in your .travis.yml
env:
  global:
  - secure: [ENCRYPTED_STRING]

before_install:
- npm install -g jspm
- jspm config registries.github.auth $JSPM_GITHUB_AUTH_TOKEN
  1. Optional

nano ~/.jspm/config

remove the registries.github part so that the token will only be used by Travis (not by you).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment