如何为组织帐户生成GitHub

如何为组织帐户生成GitHub

本文介绍了如何为组织帐户生成GitHub OAuth令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GitHub上创建了一个组织.我的组织有一些存储库.这些存储库包含API文档,我想通过Travis-CI重新构建并发布到gh-pages分支.为了使Travis-CI可以访问我组织的回购协议,我需要生成一个OAuth令牌,对其进行加密,然后添加该加密的令牌,然后在.travis.yml文件中添加该令牌,如下所示...

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"

SO帖子解释了该过程,并提供了有关如何执行此操作的详细信息用于用户帐户.如何为组织帐户生成所需的OAuth令牌?

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?

推荐答案

当前无法实现,您只能为用户帐户创建令牌,因为用户帐户具有与之关联的权限(组织没有权限).因此,您需要使用一个可以访问相关存储库的帐户创建令牌,并将其提供给Travis.您也可以为此目的创建一个机器帐户.

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.

这篇关于如何为组织帐户生成GitHub OAuth令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 02:10