13

我已按照 Amazon ECR 插件(https://wiki.jenkins-ci.org/display/JENKINS/Amazon+ECR上的说明进行操作,它只是指示用户安装 Amazon ECR 并配置 Docker Build & Deploy 插件) ,但 Jenkins 无法通过 ECR 进行身份验证。

产生的错误信息是:

denied: Your Authorization Token has expired. Please run 'aws ecr get-login' to fetch a new one.

非常感谢任何人可以提供的任何建议。

4

2 回答 2

2

在我的 Jenkins 作业中,我总是将此命令用作登录 ECR 的第一步:

aws ecr get-login --no-include-email --profile ecr | bash

其中“--profile ecr”是 Jenkins 中的预定义配置文件(.asw/config、.aws/credentials)

于 2019-11-13T20:25:21.720 回答
0

如果您env.AWS_ECR_LOGIN=true在管道中设置变量,问题就解决了。这是docker.withregistry一步上的东西: https ://issues.jenkins-ci.org/browse/JENKINS-44143

于 2017-06-15T09:44:19.220 回答