簡體   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