amazon-web-services - 如何使用 cdk 将 github repo 与 aws 连接?
问题描述
我正在学习 aws cdk 并尝试制作代码管道。
我在 github 上创建了个人访问密钥并将其保存在 aws secret manager 上。
然后在我的 cdk 堆栈中我写了`
pipeline.addStage({
stageName:"Source",
actions:[
new CodePipelineAction.GitHubSourceAction({
actionName: 'CheckOut',
owner: 'Mahmood787',
repo: "aws-pipeline",
oauthToken: cdk.SecretValue.secretsManager('github2'),
output:sourceOutput,
branch:"master"
})
]
});
在 cdk deploy 上我得到这个错误
无法在 GitHub 上注册 Webhook。错误原因:凭据无效 [StatusCode: 401, Body: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}]
我有什么遗漏吗?
解决方案
推荐阅读
- svg - 将 svg 设置为全宽
- django - 通过 curl 或 request.post 运行 django admin 命令
- ecmascript-6 - 为什么通常支持或提到 ES6?
- php - 如何检查多列?
- c - 未定义对“[函数]”的引用
- angular - 在 Angular 7 应用程序的组件属性中存储密码有多安全?
- php - Zend Framework3中composer更新时如何集成simplesamlphp库和更新配置
- kubernetes - 如何找到kubernetes命令的json格式
- scala - 项目 def 的 .settings(...) 中列出的设置是否等同于子项目的 sbt 文件中的设置?
- javascript - 向nginx反向代理传递参数