Getting error while pushing images to public ECR

0

I am trying to push images to Public ECR using the push commands given in the ECR. I am getting the below issue: Error saving credentials: error storing credentials - err: exit status 1, out: error storing credentials - err: exit status 1, out: The stub received bad data.``. Has someone faced the same issue while pushing images to public ECR?

Surabhi
asked 10 months ago1466 views
3 Answers
1

Try this:

Go to C:\Users\your_username\.docker\config.json.

And delete "credsStore": "desktop"

profile picture
answered 10 months ago
  • Yes this solution works in windows 10 along with aws configure sso and its profile-name using below sample

    aws ecr-public get-login-password --region us-east-1 --profile aws-cli | docker login --username AWS --password-stdin public.ecr.aws/XXXXXXXXX

0

Which commands do you use to push to ECR?

profile picture
answered 10 months ago
  • I am using the below push command for public ECR:

    aws ecr-public get-login-password --region <region> | docker login --username AWS --password-stdin <public repo URI> docker build -t <public repo name> . docker tag <public repo>:<tag> <public repo URI>:<tag> docker push <public repo URI>:<tag>

    I am getting the above issue on the login command- aws ecr-public get-login-password --region <region> | docker login --username AWS --password-stdin <public repo URI>

0

Hi, if you are running on Window Machine you are probably experience the issue reported here

https://github.com/aws/aws-cli/issues/5636

There are few workaround available listed in the thread but unfortunately not a final solution

AWS
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions