繁体   English   中英

`无基本身份验证凭证` Github 到 AWS ECR 部署 git 事件

[英]`no basic auth credentials` Github to AWS ECR deployment on git events

我已经完成了 Flux for k8s 部署到 AWS EKS 的设置,为此我配置了 Github 和 k8S,如下所示:

https://www.weave.works/blog/gitops-with-github-actions-eks

no basic auth credentials

提前致谢

您需要使用以下命令登录 ECR Repo:

aws ecr get-login-password \
        --region <region> \
    | docker login \
        --username AWS \
        --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com

ECR 存储库 URL:<aws_account_id>.dkr.ecr.region.amazonaws.com

例子:

sh "aws ecr get-login-password --region us-west-1 | docker 登录 --username AWS --password-stdin 09xxxxxxxxxx.dkr.ecr.us-west-1.amazonaws.com"

此命令使用 GetAuthorizationToken API 检索并显示身份验证令牌,您可以使用该令牌对 Amazon ECR 注册表进行身份验证。 ~(引自亚马逊文档)

参考: https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM