热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

AWSCodePipeline无法访问组织的存储库-AWSCodePipelinenotabletoaccessOrganization'srepositories

IamtryingtosetupContinuousdeploymentspipelinesinAWSCodepipeline.我正在尝试在AWSCodepipeline中设置

I am trying to setup Continuous deployments pipelines in AWS Codepipeline.

我正在尝试在AWS Codepipeline中设置持续部署管道。

While creating a pipeline I provide "Source provider" as GitHub and then connect to GitHub. I am able to see my public repositories in "Repository" drop-down in create Pipeline page. But I am not able to see my Organization's private repositories in this drop-down. I have write access in Organization.

在创建管道时,我将“Source provider”作为GitHub提供,然后连接到GitHub。我可以在创建管道页面的“存储库”下拉列表中看到我的公共存储库。但是我无法在此下拉菜单中看到我的组织的私人存储库。我在组织中有写访问权限。

How can I make AWS Codepipeline have access to my organizations repositories.

如何使AWS Codepipeline可以访问我的组织存储库。

2 个解决方案

#1


12  

AWS CodePipeline requires two GitHub scopes for its operation, as outlined in section GitHub within Product and Service Integrations with AWS CodePipeline: Source Action Integrations:

AWS CodePipeline需要两个GitHub范围才能运行,如使用AWS CodePipeline的产品和服务集成中的GitHub部分所述:源操作集成:

[...] You can connect to the GitHub repository by either creating a new pipeline or editing an existing one. The first time you add a GitHub repository to a pipeline, you will be asked to authorize AWS CodePipeline access to your repositories. To integrate with GitHub, AWS CodePipeline uses OAuth tokens and requires two GitHub scopes: admin:repo_hook, which is used to detect when you have committed and pushed changes to the repository, and repo, which is used to read and pull artifacts from public and private repositories into a pipeline. For more information about GitHub scopes, see the GitHub Developer API Reference.
Access for AWS CodePipeline is configured for all repositories to which that GitHub account has access; it cannot currently be configured for individual repositories.
[emphasis mine]

[...]您可以通过创建新管道或编辑现有管道来连接到GitHub存储库。第一次将GitHub存储库添加到管道时,系统会要求您授权AWS CodePipeline访问您的存储库。为了与GitHub集成,AWS CodePipeline使用OAuth令牌,并且需要两个GitHub范围:admin:repo_hook,用于检测何时提交和推送对存储库的更改,以及repo,用于从public和read中读取和提取工件。私有存储库进入管道。有关GitHub范围的更多信息,请参阅GitHub Developer API Reference。为GitHub帐户有权访问的所有存储库配置AWS CodePipeline访问权限;它目前无法配置为单个存储库。 [强调我的]

Now, while you have probably done that, it is possible that your organization is set up so that it does not grant access by default (while this is visible and adjustable when authorizing a new app/service, it is easily overlooked) - here's the resp. GitHub tooltip:

现在,虽然您可能已经这样做了,但您的组织可能已设置为默认情况下不授予访问权限(虽然在授权新应用程序/服务时这是可见且可调整的,但很容易被忽略) - 这是RESP。 GitHub工具提示:

Until access is granted by an owner, the application cannot access the organization's private data or modify its public data.

在所有者授予访问权限之前,应用程序无法访问组织的私有数据或修改其公共数据。

Provided you are an owner of the organization, you can explicitly grant access by doing the inverse instructions outlined in the referenced CodePipeline GitHub documentation:

如果您是组织的所有者,则可以通过执行引用的CodePipeline GitHub文档中概述的反向说明来明确授予访问权限:

You can revoke this access from GitHub by choosing Settings, choosing Applications, and then, under Authorized applications, finding AWS CodePipeline in the list of authorized applications and choosing Revoke. [...]

您可以通过选择“设置”,选择“应用程序”,然后在“授权的应用程序”下,在授权应用程序列表中查找AWS CodePipeline并选择“撤消”,从GitHub撤消此访问权限。 [...]

That is, go to your GitHub profile => Settings => ApplicatiOns=> AWS CodePipeline, and click the Grant access button for each applicable organization.

也就是说,转到您的GitHub配置文件=>设置=>应用程序=> AWS CodePipeline,然后单击每个适用组织的授予访问权限按钮。

#2


1  

We have ran into the same problem. The Repo Admin level permission is required for this to work. So you will have to request from your organization Admin level access to the repo. We ended up creating a service user with admin repo right in private org repo and then we could access the CI tooling.

我们遇到了同样的问题。此操作需要Repo Admin级别权限。因此,您必须从您的组织请求管理员级别访问回购。我们最终在私人org repo中创建了具有admin repo的服务用户,然后我们可以访问CI工具。


推荐阅读
author-avatar
靠小号3
这个家伙很懒,什么也没留下!
Tags | 热门标签
RankList | 热门文章
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有