简体   繁体   English

无法推送图像 - 因“没有基本身份验证凭据”而失败

[英]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.

相关问题 无法将图像推送到 AWS Lambda - 因“没有基本身份验证凭证”而失败 - Can't push image to AWS Lambda - fails with "no basic auth credentials" 无法将图像推送到 Amazon ECR - 因“没有基本身份验证凭证”而失败 - Can't push image to Amazon ECR - fails with "no basic auth credentials" 无法将映像推送到ECS专用注册表-没有基本的身份验证凭据 - Can't push an image to ECS Private Registry - no basic auth credentials Docker推送到AWS ECR在Windows上失败:没有基本身份验证凭据 - Docker push to AWS ECR fails on Windows: no basic auth credentials “没有基本的身份验证凭据” docker push - “no basic auth credentials” docker push 尝试将docker-image资源推送到AWS ECR时使用“无基本身份验证凭证” - Concourse “no basic auth credentials” when trying to push with docker-image resource to AWS ECR AWS CodePipeline Docker 推送命令返回“无基本身份验证凭证” - AWS CodePipeline Docker push command returns 'no basic auth credentials' 尝试从专用ECR提取图像时“没有基本身份验证凭据” - “no basic auth credentials” when trying to pull an image from a private ECR 将 docker 映像推送到 aws ecr 不会提供基本的身份验证凭据 - Pushing a docker image to aws ecr gives no basic auth credentials Docker ImagePush失败,“没有基本身份验证凭据” - Docker ImagePush failing with “no basic auth credentials”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM