docker-credential-helpers icon indicating copy to clipboard operation
docker-credential-helpers copied to clipboard

docs source about docker-credential-desktop

Open lalyos opened this issue 5 years ago • 37 comments

After a DockerForMac update i've realised, that that the ~/.docker/config.json file is not refering to osxkeychain anymore. Its uses docker-credential-desktop.

Where can i get more info, like docs, source code about this new helper.

cheers, Lajos

lalyos avatar May 06 '19 17:05 lalyos

I just updated to 2.1.0.0 and I received the following while doing a docker login with "securely store docker logins in osxkeychain" preference disabled.

Error saving credentials: error storing credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out:

Google searches are turning up dry for docker-credential-desktop. Not sure where it is, or my my docker for mac could no longer find it for docker logins after the update to 2.1.0.0

imkarrer avatar Jul 31 '19 18:07 imkarrer

I ran into the same issue when updating today. I was able to roll back to a previous release for now by going here.

erichartline avatar Jul 31 '19 22:07 erichartline

I filed docker/for-mac#3774 for tracking purposes since this issue is intended to address the documentation fordocker-credential-desktop

imkarrer avatar Aug 01 '19 14:08 imkarrer

My colleague found a fix that also worked for me. Go into preferences and tick 'Securely store Docker logins in macOS keychain'.

jpknox avatar Aug 06 '19 09:08 jpknox

unfortunately that check is already checked in my case.. If I uncheck and restart it's checked again afterwards..

markverg avatar Aug 06 '19 09:08 markverg

Ran into this same issue after upgrading to 2.1, discovering it doesn't work with Sonatype Nexus (https://github.com/docker/compose/issues/6713 it seems).

Downgraded back to 2.0, saw this issue - deleted my ~/.docker folder and restarted - was able to use Docker again! I'm going to wait until 2.2 before I update...

MisterSpicy avatar Aug 06 '19 10:08 MisterSpicy

I hit this running 2.1 and a delete of my ~/.docker directory, then relogin fixed it

gbiv avatar Aug 06 '19 14:08 gbiv

This issue is the only reference that I can find. But, in my case with Docker version 19.03.4, build 9013bf5 I find that docker-credential-desktop exists (as a symlink from /usr/local/bin/docker-credential-desktop -> /Applications/Docker.app/Contents/Resources/bin/docker-credential-desktop) and works. I demo it here https://stackoverflow.com/a/58795217/117471

RichardBronosky avatar Nov 11 '19 03:11 RichardBronosky

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

SamSharaf avatar Dec 18 '19 02:12 SamSharaf

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Error saving credentials: error storing credentials - err: exec: "docker-credential-xxxx": executable file not found in $PATH, out: ``

I've did as per your suggestion and it is working now.

Thanks :)

ArunDhwaj avatar Jan 04 '20 11:01 ArunDhwaj

if its windows, try to change credsStore value to wincred

MohanRajRavi avatar Jan 28 '20 13:01 MohanRajRavi

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Thank you. Your solution did the trick!

andreipa avatar Mar 17 '20 08:03 andreipa

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Thank you. Your solution did the trick!

I have the same problem and new to docker. Could not find "~/.docker/config.json" (tried C:\ProgramData\Docker), using windows, how to locate it? Thanks.

LunaNYC avatar Apr 03 '20 21:04 LunaNYC

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Thank you. Your solution did the trick!

I have the same problem and new to docker. Could not find "~/.docker/config.json" (tried C:\ProgramData\Docker), using windows, how to locate it? Thanks.

ln -s /c/Users/<USER NAME>/.docker/ ~/.docker

OR

ln -s /mnt/c/Users/<USER NAME>/.docker/ ~/.docker

curtisgray avatar Apr 08 '20 04:04 curtisgray

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Thank you. Your solution did the trick!

I have the same problem and new to docker. Could not find "~/.docker/config.json" (tried C:\ProgramData\Docker), using windows, how to locate it? Thanks.

ln -s /c/Users/<USER NAME>/.docker/ ~/.docker

OR

ln -s /mnt/c/Users/<USER NAME>/.docker/ ~/.docker

Thank you! I got it!

LunaNYC avatar Apr 08 '20 13:04 LunaNYC

Thank you @lalyos for opening this issue about the lack of documentation for docker-credential-desktop.

What is docker-credential-desktop?

Does it store my sensitive secrets in plaintext? Does it sell my information online? Is it malware? Will it automatically start my coffee maker?
Is it even software?

Is it ZA̡͊͠͝LGΌ? H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ.

cowlinator avatar Apr 27 '20 22:04 cowlinator

You can find more information about docker-credential-helper here.

In my case, I was using docker-toolbox to avoid the performance regressions I've seen with Docker for Mac. This does not come with these helpers by default, and the desktop credential helper only comes with Docker for Mac.

I was able to resolve this by:

  1. Downloading the helpers: brew install docker-credential-helper, then
  2. Changing "credsStore" : "desktop", to "credsStore" : "osxkeychain".

carlosonunez avatar May 10 '20 22:05 carlosonunez

@carlosonunez , you linked to the readme at the root of this repo. It contains no information about "desktop". There is no file in this repo that has "desktop" in the name. I searched the repo for "desktop", and got We couldn’t find any code matching 'desktop' in docker/docker-credential-helpers.

So, again,

What is docker-credential-desktop?

cowlinator avatar Jun 23 '20 23:06 cowlinator

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Thanks this works for me.

mrsaeedanwar avatar Jun 29 '20 08:06 mrsaeedanwar

Agreed. I hope people stop posting their workarounds here and in separate issues so that the most current comment sticks to the original issue for missing documentation.

What is docker-credential-desktop?

imkarrer avatar Sep 22 '20 16:09 imkarrer

I ran sudo opensnoop -n docker-credential-desktop and then docker-credential-desktop list, which surfaced amongst other fd accesses:

  UID    PID COMM          FD PATH
  503  33551 docker-credentia   3 /Users/saif/Library/Keychains/login.keychain-db
  503  33551 docker-credentia   3 /Library/Keychains/System.keychain

Searching "docker" in my keychain surfaced the two credentials that show up in docker-credential-desktop list (and modifying them in the keychain did show up when re-running the command)... so it looks like does not store it in plaintext and in fact does store it on the macOS keychain.

In fact, docker-credential-osxkeychain list surfaces the same set of credentials.... I tried diffing the two binaries but they don't appear to be identical... I wonder if there is some sort of repackaging osxkeychain as desktop as part of "Docker for Mac" (though it is 10x bigger 😮... ) ?

saifelse avatar Oct 19 '20 15:10 saifelse

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Thank you! It works now!

alexryabkov avatar Oct 23 '20 06:10 alexryabkov

Regarding the original question of what docker-credential-desktop actually is it seems that the situation on Windows is similar to what @saifelse found on Mac - in both cases it appears to function as a wrapper for the OS-specific store helper.

So on Windows the process tree in Procmon shows that it calls out to docker-credential-wincred passing on its arguments: image

The -desktop binary is substantially bigger than the -wincred one (~4x) so who knows what else it does, if anything.

Unfortunately because "Docker Desktop" (previously "Docker for Windows" & "Docker for Mac") is closed-source, there isn't any code at https://github.com/docker/for-win or https://github.com/docker/for-mac/ to enlighten us further...

To request clarification I imagine filing an issue on one of those repos might be the best next step - given that it would appear docker-credential-desktop is built from private code not in this repo.

sparrowt avatar Dec 10 '20 12:12 sparrowt

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Worked for me! Thanks

Dana-Drahler avatar Apr 13 '21 10:04 Dana-Drahler

Worked for me too, but is always overwritten on restart. Setting the file to readonly hangs Docker Desktop on startup.

Any solution?

dmenne avatar Oct 16 '21 07:10 dmenne

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

This worked for me. Thank you

rrehman-hbk avatar Dec 14 '21 07:12 rrehman-hbk

This worked for me ... until you restart ...

dmenne avatar Dec 14 '21 07:12 dmenne

Worked for me too, but is always overwritten on restart. Setting the file to readonly hangs Docker Desktop on startup.

Any solution?

@dmenne Did you found any solution? I have this problem too...

andrecolza avatar Aug 01 '22 10:08 andrecolza

I hit this running 2.1 and a delete of my ~/.docker directory, then relogin fixed it

This ruined everything. docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. Can not start docker now. Tried every possible command on the net. I run docker using colima

dinicolae avatar Oct 28 '22 07:10 dinicolae

I ran into this issue probably because I had installed Docker Desktop and recently decided to remove it.

Edit the file "~/.docker/config.json" and delete the following JSON key/value: "credsStore" : "desktop",

Deleting that key/value pair from the config solved it for me. Thanks @SamSharaf for sharing that solution with us.

adonig avatar Dec 16 '22 11:12 adonig