How to login into a Travis Enterprise using Travis CLI?

Roc Boronat picture Roc Boronat · Sep 15, 2016 · Viewed 8.1k times · Source

I'm trying to login to an own hosted Travis Enterprise, but usual travis login and travis login --pro are trying to login to usual Travis SAAS environment

Answer

Roc Boronat picture Roc Boronat · Sep 15, 2016

Given that your Travis is hosted at travis.fewlaps.com, run

travis login -I -t your-travis-token -e https://travis.fewlaps.com/api --github-token=personal-access-token-from-githubenterprise &&
travis endpoint --set-default -e https://travis.fewlaps.com/api

...and then, to use your own Travis instead of the common one at every travis command,

travis endpoint --set-default -e https://travis.fewlaps.com/api

Remember that Travis will need that your GitHub Enterpise has the needed permissons. Right now, we're giving to that token these permissions:

  • repo (all of them)
  • admin:repo_hook
  • user