-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECR docker login issues with CLI v2 #4962
Comments
Hi Mike, Thanks for bringing this issue to our attention. Can you verify that the region you are getting the credential from is the same region that you are attempting to login to?
If that doesn't resolve the issue can you provide the following information:
Thanks |
The previous suggestion was successful:
|
To login to your current account ECR:
|
@james-gonzalez Just a note that using @dougch |
@matthew-russo Nice, adding |
As an example for anyone else who has this issue, in my script, I had to change
to
without the eval. |
With --region works fine. I think ECR documentation should change with region values as mandatory. Documentation is after creating a repository in ECR and then click on click Push Commands |
For anyone having issues, check that you've passed the correct
@stelukutla done! |
k= #echo $p docker login -u AWS -p $s |
I had this 400 Bad Request error when I was following the steps in the official documentation to login to the ECR with Docker. But what worked for me was this command:
Note:
|
this works for me: aws ecr get-login-password --region xxx # for original region specific
aws ecr get-login-password --profile xxx # for named profile config now copy the password string & paste to replace the below xxx (you can pipe to login directly, this is only for that you want to generate the password and send to other people) echo xxx | docker login --password-stdin -u AWS https://xxx.dkr.ecr.xxx.amazonaws.com Since CLI v2 the config file uses a different naming format than the CLI credentials file for named profiles, the config file include the prefix word "profile". PS: include the prefix word "profile" only when configuring a named profile in the config file. ~/.aws/config [default]
region=us-west-2
output=json
[profile user1]
region=us-east-1
output=text ~/.aws/credentials [default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
[user1]
aws_access_key_id=AKIAI44QH8DHBEXAMPLE
aws_secret_access_key=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY |
Hi Frenz, Login to AWS cloud repositoryaws ecr get-login-password --region {{region-name}} | docker login --username AWS --password-stdin {{ecr-url}} Verisonaws --version Initially, I struggled a lot with my pre-existing "sh" scripts after updating/installing the latest version of AWS CLI. Then the above command helped me a lot. Newly added issues I'm unable to run "aws ecs update-service --force-new-deployment --cluster {{cluster-name}} --service {{service-name}}" command after upgrading to "aws-cli/2.0.6 Python/3.7.5 Windows/10 botocore/2.0.0dev10". |
I am still facing the issue |
Update documentation on an upgraded version of AWS CLI Based on suggestions from this thread aws/aws-cli#4962
This is the command that worked for me: |
None of them work. |
It looks like the original author's issue has been resolved and we've also improved documentation to be more clear based on feedback from this thread. If there are different problems with the command, please submit a new issue making sure to include debug logs and environment information. I've asked repo maintainers to lock this thread. |
Hi, I'm having trouble getting ECR to authenticate using CLI v2.
First off, I'm having no issues using CLI v1.
But I'm having trouble using the default recommended method for CLI v2.
This also isn't working, with the same error as above.
I think there's some issue with the password encoding, because this alternate
approach currently works for me with CLI v2:
See also:
#2875
I didn't see any current issues related to this, so I figured a new one is appropriate:
https://github.com/aws/aws-cli/issues?utf8=%E2%9C%93&q=ecr+get-login-password+docker+login
Best,
Mike
The text was updated successfully, but these errors were encountered: