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

Provide guidance on making secret service work

Open p opened this issue 7 years ago • 3 comments

On Debian, docker appears to be configured to use secret service by default. However, this did not work on my machine:

# docker login -u user -p pass
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
** Message: 00:51:34.306: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Error saving credentials: error storing credentials - err: exit status 1, out: `The name org.freedesktop.secrets was not provided by any .service files`

My internet searches for "secret service" yielded freedesktop specifications for it but nothing related to which program I need to have installed to have it, or how to start it.

From my experience, freedesktop bits do not always come with adequate user documentation, but since it is rather non-trivial to figure out how to make docker not try to use the various gnome desktop services (https://github.com/docker/cli/issues/1219), please consider adding some guidance on how to make the default credential store work, including on a headless machine with no X installed.

p avatar Dec 29 '18 06:12 p

Commenting here since I had the same problem and a Google search lead me here and didn't yield much otherwise...

Having the 'pass' password manager installed fixes this for me on a headless Debian Buster (but then stores the saved credentails unencrypted...):

$ sudo apt install pass
...
...
...
$ docker login 
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: ***********
Password: 
WARNING! Your password will be stored unencrypted in /home/xxxxxxxxx/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

flipsa avatar Dec 30 '21 17:12 flipsa

Just hit this on openSUSE... I've tried reinstalling, and I've tried nuking ~/.docker/config.json without any luck.

tucked avatar May 04 '23 21:05 tucked

Apparently docker-credential-secretservice just doesn't work on headless machines...

I worked around by using docker-credential-pass instead... First, download docker-credential-pass from GitHub: https://github.com/docker/docker-credential-helpers/releases/

sudo zypper install gpg2 password-store
pass init $YOUR_GPG_ID  # if you don't have one: gpg2 --full-generate-key && gpg2 -k
# Make sure docker-credential-pass is on $PATH (e.g. in /usr/local/bin or ~/bin)
docker login

tucked avatar May 04 '23 22:05 tucked