AWS CodeDeploy 代理无法下载 GitHub 捆绑包

问题描述 投票:0回答:1

我按照此处的说明设置了 GitHub Actions->Code Deploy AWS 管道:

https://loisthash.medium.com/ci-cd-from-github-to-aws-ec2-667e6c4f4ffc

我收到此错误:

2024-11-11T20:56:17 信息 [codedeploy-agent(26727)]: [Aws::CodeDeployCommand::Client 200 0.01756 0 次重试] put_host_command_complete(command_status:"失败",diagnostics:{格式:"JSON",payload:"{"error_code":5,"script_name":"","message":"无法下载捆绑包'https://api.github.com/repos//deployment-test/tarball/2ca6270054db4d62621f020b88f804fe0fa39c40' 3 次重试后,服务器返回代码:404 '未找到';404 '未找到';404 '未找到';不是找到'.","log":""}"})

该存储库位于 GitHub 组织中,但我已按照此处的说明打开了第三方访问权限:

https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-partners-github.html#github-integ-behaviors-auth

没有其他想法。

amazon-web-services aws-code-deploy
1个回答
0
投票

您需要确保用于 GitHub 连接的 PAT(个人访问令牌)包含正确的范围:

•   repo (for private repositories)
•   admin:repo_hook (for webhook and services management)
•   read:org (if your organization restricts repository access)

按照您提供的两个链接,中等文章中仅遗漏了此详细信息,因此您可能没有添加正确的范围。

© www.soinside.com 2019 - 2024. All rights reserved.