[英]Can't push image - fails with "no basic auth credentials"
GitLab CICD Pipeline failed in the development stage, Successfully built and tagged but Failed while push refers to Amazon repository(ECR). GitLab CICD Pipeline 在开发阶段失败,成功构建和标记但在推送引用 Amazon 存储库(ECR)时失败。
*6be90f1a2d3f: Preparing
no basic auth credentials
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1*
You need to check the value of your GitLab job secrets regarding:您需要检查 GitLab 工作机密的价值:
AWS_REGISTRY_URL
AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
As in this thread (for a bitBucket pipeline, but can be applied to a GitLab one), your pipeline should include a login step与此线程一样(对于 bitBucket 管道,但可以应用于 GitLab 管道),您的管道应包含登录步骤
eval $(aws ecr get-login --no-include-email --region YOUR-REGION-HERE | sed 's|https://||')
make sure to change the region from
YOUR-REGION-HERE
to the one you are trying to deploy to.确保将区域从
YOUR-REGION-HERE
更改为您尝试部署到的区域。 For me this is--region ap-southeast-2
.对我来说,这是
--region ap-southeast-2
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.