Reputation: 57
I have done setup of Flux for k8s deployment to AWS EKS, for it I have configured Github and k8S with the following:
https://www.weave.works/blog/gitops-with-github-actions-eks
but getting no basic auth credentials
Thanks in advance
Upvotes: 0
Views: 3015
Reputation: 310
You need to login into the ECR Repo using the below command:
aws ecr get-login-password \
--region <region> \
| docker login \
--username AWS \
--password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
ECR Repository URL : <aws_account_id>.dkr.ecr.region.amazonaws.com
Example :
sh "aws ecr get-login-password --region us-west-1 |
docker login
--username AWS
--password-stdin 09xxxxxxxxxx.dkr.ecr.us-west-1.amazonaws.com"
This command retrieves and displays an authentication token using the GetAuthorizationToken API that you can use to authenticate to an Amazon ECR registry. ~ (Quoted from Amazon Docs)
Reference : https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html
Upvotes: 1