Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error storing credentials - err: exit status 1, out: not implemented #102

Closed
shumkov opened this issue Apr 16, 2018 · 13 comments
Closed

error storing credentials - err: exit status 1, out: not implemented #102

shumkov opened this issue Apr 16, 2018 · 13 comments

Comments

@shumkov
Copy link

shumkov commented Apr 16, 2018

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]
@shumkov
Copy link
Author

shumkov commented Apr 16, 2018

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

@shumkov shumkov closed this as completed Apr 16, 2018
@apremalal
Copy link

@shumkov what did you use to solve this issue?

@bondxf
Copy link

bondxf commented May 2, 2018

@shumkov I also experienced the same issue. Could you share what you did to solve the issue?

@shumkov
Copy link
Author

shumkov commented May 2, 2018

@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.

@Nuru
Copy link

Nuru commented Oct 22, 2020

There is no need to use docker login or docker logout when using the ecr-credential-helper. You are authenticated automatically when needed by docker.

@evmoroz
Copy link

evmoroz commented Feb 11, 2021

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

@PrimeTimeTran
Copy link

I turned docker on and it fixed this error for me.
https://stackoverflow.com/questions/72645895/credential-saving-error-when-connecting-to-service-on-docker

@gmmvllfrt
Copy link

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

@gnumoksha
Copy link

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

@sterling000
Copy link

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.

@bcouetil
Copy link

I just experienced that as well, in CI. What is strange is that it works a few weeks ago... within same Docker image 20.10...

I need to pull image from ECR and push to OVH.

What I ended up doing, is removing ~/.docker/config.json after pulling the ECR image, to be able to authenticate to OVH registry and pushing the image.

@jonathanmdr
Copy link

jonathanmdr commented May 23, 2023

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

@pauldthomson
Copy link

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:

return notImplemented
. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

13 participants