【问题标题】:Error faced while using Codepipeline in AWS在 AWS 中使用 Codepipeline 时遇到的错误
【发布时间】:2020-01-12 14:56:40
【问题描述】:

我正在创建一个源为 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

你能帮我解决这个问题吗?

【问题讨论】:

  • 错误很明显,MyDemoRepo master 分支丢失
  • 是的,但我相信 master 分支是默认为 mde 的分支,我们不必像我尝试创建它那样创建它,但是对于创建分支,该选项对于我的 IAM 用户是灰色的.

标签: amazon-web-services aws-codepipeline


【解决方案1】:

默认情况下,当您通过控制台或 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

【讨论】:

    猜你喜欢
    • 2017-02-11
    • 1970-01-01
    • 2018-11-27
    • 2020-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-16
    • 2021-08-07
    • 2020-08-25
    相关资源
    最近更新 更多