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

爷,独闯天下 提交于 2020-02-26 11:32:45

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/31159275/how-do-i-generate-the-github-oauth-token-for-organization-accounts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!