4

I have encountered this error while doing a simple sudo docker login. On checking the logs using journalctl -xe I found the following problem.

Jun 05 01:51:30 ubuntu sudo[24492]: pam_unix(sudo:session): session opened for user root by (uid=0)`

Jun 05 01:51:34 ubuntu dbus-daemon[7120]: [session uid=0 pid=7118] Activating service name='org.freedesktop.secrets' requested by ':1.41' (uid=0 pid=24502 comm="docker-credential-secretservice stostore " label="unconfined")`

Jun 05 01:51:34 ubuntu gnome-keyring-daemon[24511]: couldn't create socket directory: /home/aliicp/.cache/keyring-KUIFKZ: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-daemon[24511]: couldn't bind to control socket: /home/aliicp/.cache/keyring-KUIFKZ/control: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-d[24511]: couldn't create socket directory: /home/aliicp/.cache/keyring-KUIFKZ: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-d[24511]: couldn't bind to control socket: /home/aliicp/.cache/keyring-KUIFKZ/control: Permission denied
Jun 05 01:51:59 ubuntu sudo[24492]: pam_unix(sudo:session): session closed for user root`

Jun 05 01:53:34 ubuntu dbus-daemon[7120]: [session uid=0 pid=7118] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)

the keyring value set from command is ps aux | grep keyring:

aliicp    24044  0.0  0.3 288356  7944 pts/0    Sl+  00:29   0:00 gnome-keyring-daemon --start --replace --foreground --components=secrets,ssh,pcks11

aliicp    24103  0.0  0.0  21536  1016 pts/2    S+   00:33   0:00 grep --color=auto keyring

this problem doesn't happen when I am using VirtualBox or Kitmatic instead of VMware. My base OS is Win7.

Thanks.

Rajesh Pandya
  • 1,540
  • 4
  • 18
  • 31
Ali
  • 37
  • 1
  • 1
  • 6
  • are you behind a proxy? do you an error when you try to pull an image? – andolsi zied Jun 05 '18 at 11:33
  • I don't think I am. Command `env | grep -i proxy` doesn't return anything. I cannot perform push into my repo which is what I am interested in. Pull from community will work regardless of the login. – Ali Jun 06 '18 at 06:50
  • I used command `startx` and it opened up a new root terminal. I can potentially login to docker now but this doesn't look like a very viable option. I am not that proficient on linux by the way. – Ali Jun 07 '18 at 09:35
  • Answer to this question solved the same problem for me: https://stackoverflow.com/questions/50151833/cannot-login-to-docker-account – Jehy Jul 25 '18 at 09:35

1 Answers1

5

You could add yourself to the docker group. Doing so would allow docker to access your keyring and thus remove the error.

That is, on Linux,

sudo usermod -a -G docker $USER
mango parade
  • 133
  • 2
  • 9
  • 2
    This solution solved the problem for me. Thank you. The required steps are: [1] sudo usermod -a -G docker your-user-name [2] Now you can run docker without sudo. It should work. – wonderingdev May 10 '19 at 08:51