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

docker does not gracefully logout for non-default registry #204

Closed
shhsu opened this issue Jun 19, 2017 · 3 comments · Fixed by #2583
Closed

docker does not gracefully logout for non-default registry #204

shhsu opened this issue Jun 19, 2017 · 3 comments · Fixed by #2583

Comments

@shhsu
Copy link
Contributor

shhsu commented Jun 19, 2017

Steps to reproduce the issue:
We are developer an ACR credential helper. The issue was discovered during our test on os X.

We ran

  1. az acr login -name <our registry>
  2. az acr logout

The log out succeeded and the credentials were removed from osxkeychain. However, We do see the following output

WARNING: could not erase credentials: error erasing credentials - err: exit status 1, out: 'The specified item could not be found int the keychain'

After looking into the docker code. We realized this is not an ACR specific issue. This issue should repro on any non-default registry if osxkeychain was used in cred store .

Problem with the code:
https://github.com/docker/cli/blob/master/cli/command/registry/logout.go#L42-L53

In the case where hostnameAddress and serverAddress are the same, we would have duplicated entries in regsToTry. Assuming you can find serverAddress in the config file, Erase() will be called twice for this serverAddress. Cred stores such as file store or WinCred does not complain if you try to remove an entry that does not exist, but osxkeychain would.

@shhsu
Copy link
Contributor Author

shhsu commented Jun 19, 2017

We are closing our issue Azure/acr-docker-credential-helper#12 for this.
@sajaya @DavidObando

@Rapix-x
Copy link

Rapix-x commented Jun 4, 2019

This also happens on Ubuntu 18.04 with the pass credential helper.

@shqear93
Copy link

Same issue here!

Model Name: Mac mini
Model Identifier: Macmini8,1

Docker version 19.03.2, build 6a30dfc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment