amazon-web-services - 在 AWS 中使用 Codepipeline 时遇到的错误
问题描述
我正在创建一个源为 Codecommit 的管道,并使用 CodePipeline 将 CodeCommit 存储库中维护的代码部署到单个 Amazon EC2 实例。当您将更改推送到 CodeCommit 存储库时会触发您的管道。
但是在执行管道时,我面临以下错误:-
Invalid action configuration
The action failed because no branch named master was found in the selected AWS CodeCommit repository MyDemoRepo. Make sure you are using the correct branch name, and then try again. Error: null
你能帮我解决这个问题吗?
解决方案
默认情况下,当您通过控制台或 CLI [1] 在 CodeCommit 中创建存储库时,不会创建任何分支,这可以使用以下命令进行确认:
$ git ls-remote https://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo
请推送一些代码:
$ git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo
$ touch a.txt
$ git checkout -b master
$ git add .
$ git commit -m "Initial Commit"
$ git push
[1] https://docs.aws.amazon.com/cli/latest/reference/codecommit/create-repository.html
推荐阅读
- python-xarray - 使用 salem 中的 geojson 文件对 xarray 数据集中的感兴趣区域进行子集化
- image - 如何在 Vue.js 应用程序的 img 标签中显示 blob 图像?
- performance - 没有后缀的情况下,如何从已有值中获取需要的值?
- graphene-django - 如何避免在 mutate() 函数中使用过多的参数?
- reactjs - .env 文件不显示自定义环境变量
- c# - Azure 认知服务 TTS - 示例应用中其他语言的错误
- python - 如何从元组列表中添加值
- .net - .net core Soap 服务器响应
- eclipse - 我的控制器不会收到用户的输入(Spring boot)
- reactjs - 如何在material-ui中使一张卡片的高度与其他卡片的高度相同?