Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'No basic auth credentials' when using amazon-ecr-credential-helper

Tags:

docker

aws-ecr

I'm trying to setup the amazon-ecr-credential-helper but always get no basic auth credentials when I try to docker pull.

When I use aws ecr get-login and docker login ... then I have no problems.

I followed the instructions in their README file using the docker image to create the binary.

In the troubleshooting section they say that a log file should be stored in ~/.ecr/log but the /.ecr folder doesn't exist.

Specs: Docker version 18.06.1-ce, build e68fc7a

aws-cli/1.16.31 Python/2.7.15 Darwin/17.4.0 botocore/1.12.21

MacOS High Sierra

I hope somebody has an idea to figure out what's going wrong.

like image 262
Peter Lustig Avatar asked Aug 15 '26 10:08

Peter Lustig


1 Answers

I solved this problem by ensuring, the file ~/.docker/config.json was of the following content:

{
    "credsStore": "ecr-login"
}

This did not work for me:

{
    "credHelpers": {
        "aws_account_id.dkr.ecr.region.amazonaws.com": "ecr-login"
    }
}
like image 181
Jonas_Hess Avatar answered Aug 18 '26 03:08

Jonas_Hess



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!