0

I'm trying to login to ECR with the following command:

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

Which return this error

Error saving credentials: error storing credentials - err: exit status 1, out: `The stub received bad data.`

I tried storing the AWS credentials in a file or setting them in the cmd, buy i keep getting the same error.

I also tried to change my config.json file but It didn't help.

How can i solve this? I need to login to push some images... Thanks in advice

Pippo
  • 1
  • It sounds like `aws ecr-public get-login-password --region us-east-1` may be failing, so it is piping bad data into the next `docker login` command. Please try first running `aws ecr-public get-login-password --region us-east-1` by itself and seeing what output you get. – Mark B Jul 17 '23 at 13:30
  • It works and returns a very long password. – Pippo Jul 17 '23 at 13:33
  • Why don't you take that output, and just manually give it to the `docker login` command using `--password` instead of `--password-stdin`? – Mark B Jul 17 '23 at 15:17
  • Not working neither. I also tried from another pc but i keep getting this error. – Pippo Jul 17 '23 at 15:28
  • Looks like it may be a docker config issue. Did you look at these answers? https://stackoverflow.com/questions/60807697/docker-login-error-storing-credentials-the-stub-received-bad-data – Mark B Jul 17 '23 at 15:30

0 Answers0