Peter Lustig
Peter Lustig

Reputation: 1701

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

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.

Upvotes: 7

Views: 2720

Answers (1)

Jonas_Hess
Jonas_Hess

Reputation: 2018

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"
    }
}

Upvotes: 1

Related Questions