79

I have created an organization on GitHub. My organization has some repos. These repos have API documentation that I would like to re-build and publish to gh-pages branch via Travis-CI. In order to give Travis-CI access to my organization's repos I need to generate an OAuth token, encrypt it, and then add then include the encypted token in the .travis.yml file as follows...

env:
  global:
  - secure: "lots-of-seemingly-random-characters"

This SO post explains the process and provides the details on how to do this for user accounts. How do I generate the required OAuth token for organization accounts?

Community
  • 1
  • 1
davidrpugh
  • 3,993
  • 1
  • 30
  • 42
  • Seems like [on `gitlab.com` this isn't possible](https://gitlab.com/gitlab-org/gitlab-ce/issues/37778) either. – IsaacS Oct 31 '17 at 22:00

1 Answers1

111

That's not possible currently, you can only create tokens for user accounts since user accounts have permissions associated with them (organizations don't). So, you'd need to create a token with an account which has access to the repository in question and give that to Travis. You can also create a machine account for that purpose.

Ivan Zuzak
  • 16,774
  • 3
  • 65
  • 58