amazon-ecr-credential-helper: error storing credentials - err: exit status 1, out: `not implemented`

Hi there,

I got the strange error:

~/build/dashevo/dashdrive$ eval $(aws ecr get-login --no-include-email)
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error saving credentials: error storing credentials - err: exit status 1, out: `not implemented`

~/build/dashevo/dashdrive$ cat ~/.docker/config.json
{
    "credsStore":"ecr-login"
}

~/build/dashevo/dashdrive$ docker-credential-ecr-login version
0.6.0

~/build/dashevo/dashdrive$ docker version
Client:
 Version:       18.04.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    3d479c0
 Built: Tue Apr 10 18:21:14 2018
 OS/Arch:       linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.04.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   3d479c0
  Built:        Tue Apr 10 18:19:24 2018
  OS/Arch:      linux/amd64
  Experimental: false

Credentials exported as env vars:

Setting environment variables from repository settings
$ export AWS_SECRET_ACCESS_KEY=[secure]
$ export AWS_ACCESS_KEY_ID=[secure]
$ export AWS_DEFAULT_REGION=[secure]

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 12
  • Comments: 18

Most upvoted comments

While I agree that there is no need to call docker login with the credential helper, the problem still remains, some tools do call it (cdk will call docker login when using Image.fromAsset() as an example). So I think there should be a fallback that stores the credentials, and not a not implemented error

@apremalal @bondxf

  1. Configure docker daemon:
{
    "credsStore":"ecr-login"
}
  1. Export your AWS credentials to env:
export AWS_SECRET_ACCESS_KEY=[secure]
export AWS_ACCESS_KEY_ID=[secure]
export AWS_DEFAULT_REGION=[secure]

Then you can pull/push your images without docker login.

Why was this closed, literally the entire point of this project is so you don’t have to call docker login, and then it breaks any other repositories, if you have some images being pulled from docker hub and some being pulled from aws ecr, all the docker hub entries are broken and the comments in here say to remove the credHelpers and go back to using docker login command.

I also encountered this, Error saving credentials: error storing credentials - err: exit status 1, out: not implemented

Solution that works on my end, I run: nano ~/.docker/config.json then from "credsStore" : "ecr-login" I change the value of credsStore to "credsStore" : "osxkeychain" after that I run the login aws command again and Login Succeeded

I’m running Gnu/Linux and the following worked for me:

  • remove the entire credHelpers and the comma from ~/.config/docker/config.json
  • aws ecr get-login-password | docker login --username AWS --password-stdin MY_ECR_ID.dkr.ecr.us-east-1.amazonaws.com

@shumkov what did you use to solve this issue?

This worked for me!

Error: Error saving credentials: error storing credentials - err: exit status 1, out: not implemented Solution: I edited the file ~/.docker/config.json changing from "credsStore": "ecr-login" to "credsStore": "osxkeychain".

This worked for me!

Error: Error saving credentials: error storing credentials - err: exit status 1, out: not implemented Solution: I edited the file ~/.docker/config.json changing from "credsStore": "ecr-login" to "credsStore": "osxkeychain".

I don’t think this is the right solution. It looks like docker login calls the store command for any configured credential helper, which calls the Add function in the helper interface, and this one hasn’t implemented it: https://github.com/awslabs/amazon-ecr-credential-helper/blob/5c087f35e29c21d4e42a4c999c7e6c4cad32d7db/ecr-login/ecr.go#L75. I think it “works” since on a pull the Get function is called, and this helper checks its cache for an existing valid token before generating a new one and storing it (which is what the Add would have done).

Changing the configured cred helper means not using this credential helper at all.

Ops… Sorry, I should not use eval $(aws ecr get-login --no-include-email) anymore.

@apremalal @bondxf

  1. Configure docker daemon:
{
    "credsStore":"ecr-login"
}

Nonsense. This changes (or forces a particular value of) a Global Setting For Everything just to solve One Problem With One Thing.