Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when logging into ECR with Docker login: "Error saving credentials... not implemented"

I'm trying to log in to AWS ECR with the Docker login command. I can get a password with the AWS CLI with the command aws ecr get-login-password but when piping this into the docker login command I get the following error:

Error saving credentials: error storing credentials - err: exit status 1, out: `not implemented`

The command I am running is the one recommended in the AWS ECR documentation:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin account_id_redacted.dkr.ecr.us-east-1.amazonaws.com/blog-project

I'm running the latest version of AWS CLI as of this question, 2.0.57.

I'm running Docker version 2.4.0 on macOS 10.14.6

Has anyone else run into this issue, and if so have they found a solution?

I've definitely achieved this in the past, but I wonder if there is an issue between the latest versions of Docker and the AWS CLI...

like image 251
chrxr Avatar asked Oct 21 '20 01:10

chrxr


People also ask

How do I authenticate with ECR docker?

To authenticate Docker to an Amazon ECR registry with get-login-password, run the aws ecr get-login-password command. When passing the authentication token to the docker login command, use the value AWS for the username and specify the Amazon ECR registry URI you want to authenticate to.

What is the output of the Get login command?

This command retrieves an authentication token using the GetAuthorizationToken API, and then it prints a docker login command with the authorization token and, if you specified a registry ID, the URI for an Amazon ECR registry.

How to integrate ECR with Docker without Docker login?

Put the file under ~/.docker/config.json or C:\Users\bob\.docker\config.json with the following content: Now, you can use the docker command to interact with ECR without docker login. When you type docker push/pull YOUR_ECR_IMAGE_ID, Credential Helper is called and communicates with the ECR endpoint to get the Docker credentials.

What is Amazon ECR Docker credential helper?

This is where Amazon ECR Docker Credential Helper makes it easy for developers to use ECR without the need to use docker login or write logic to refresh tokens and provide transparent access to ECR repositories.

How to fix AWS ECR get-login -e error?

If you get the following error: unknown shorthand flag: 'e' in -e, then run the previous command again, without the $ ( and ). So only run aws ecr get-login --region <region> It will output a set of commands for you to copy in the terminal directly. Make sure to remove the -e none near the end, and execute the command.

What are the minimum requirements to run Azure registry on Docker?

You need Docker client version 18.03 or later. When using docker login, provide the full login server name of the registry, such as myregistry.azurecr.io. Ensure that you use only lowercase letters. Example:


2 Answers

I'm not 100% sure what the issue was here, but it was something to do with the Docker credentials helper.

I installed the Docker credentials helper for macOS, changed the credsStore parameter in ~/.docker/config.json to osxkeychain. That fixed the issues.

like image 146
chrxr Avatar answered Nov 15 '22 11:11

chrxr


I had similar issue, seems like my ~/.docker/config.json was totally messed after work with multiple repos / hubs.

So I just wiped out all the content in this file leaving it empty and rerun aws ecr get-login-password | docker login ... which automatically populated config with appropriate values.

like image 30
juggernaut Avatar answered Nov 15 '22 09:11

juggernaut