How do I generate the GitHub OAuth token for organization accounts?

50,762

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.

Share:
50,762
davidrpugh
Author by

davidrpugh

Experienced research software engineer and data scientist with strong FP and OO programming skills. Deep knowledge of core scientific Python stack (i.e., NumPy, SciPy, SymPy, Pandas, Matplotlib, NetworkX, Jupyter/IPython, scikit-learn); experienced Scala developer with knowledge of Spark, Akka, and Cassandra (i.e., core components of the SMACK stack); experience using Git, Unix, and SQL. Adept at learning and applying new technologies. Excellent communication skills.

Updated on July 05, 2022

Comments

  • davidrpugh
    davidrpugh almost 2 years

    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?

  • yanana
    yanana about 8 years
    Do you have any plan to support this?
  • justin.m.chase
    justin.m.chase almost 8 years
    So if the user associated with these accounts leaves the organization we would have to replace all of the tokens in our travis files? Is this intentionally not supported, or just not yet supported?
  • justin.m.chase
    justin.m.chase almost 8 years
    What is a "machine account", I can't seem to find documentation on this.
  • justin.m.chase
    justin.m.chase almost 8 years
    Nevermind, I see its just an account that is created specifically for use by the org for automation. Nothing fancy.
  • Huang C.
    Huang C. about 7 years
  • Alex Barker
    Alex Barker about 4 years
    Problem is that machine account takes up a seat in the organization.
  • Jirka
    Jirka over 3 years
    hi, is there any update on the org token?
  • ielkhalloufi
    ielkhalloufi almost 2 years
    Is there any movement? I can't seem to find a good solution for this...