如何为组织帐户生成 GitHub OAuth 令牌?

我在 GitHub 上创建了一个组织。我的组织有一些回购协议。这些回购有 API 文档,我想重新建立和发布到 gh-pages分支通过特拉维斯-CI。为了让 Travis-CI 访问我的组织的回购协议,我需要生成一个 OAuth 令牌,加密它,然后添加,然后包括加密令牌在 .travis.yml文件如下..。

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

这个 所以邮局解释了这个过程,并提供了有关如何为用户帐户执行此操作的详细信息。如何为组织帐户生成所需的 OAuth 令牌?

68991 次浏览

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.