docker / cli

The Docker CLI
Apache License 2.0
4.94k stars 1.93k forks source link

Error saving credentials: error storing credentials in Ubuntu 18.04 LTS #1136

Open thishandp7 opened 6 years ago

thishandp7 commented 6 years ago

Hi there, when I try to log into docker hub from the CLI to push and pull the images, I'm getting this error. My os is Ubuntu 18.04 LTS

`Error saving credentials: error storing credentials - err: exit status 1, out: `Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached``

Setps to reproduce :

  1. docker login
  2. enter username once prompt
  3. enter password once prompt

Following are my docker version and docker info

docker version

`Client:
 Version:      18.05.0-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   f150324
 Built:        Wed May  9 22:16:13 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.05.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   f150324
  Built:        Wed May  9 22:14:23 2018
  OS/Arch:      linux/amd64
  Experimental: false`

docker info

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 111
Server Version: 18.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-23-generic
Operating System: Ubuntu 18.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.58GiB
Name: 
ID: 
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

` Thanks in advance

allbann76 commented 6 years ago

have the same problem too

docker version

 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Wed Jun 20 21:43:51 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Wed Jun 20 21:42:00 2018
  OS/Arch:      linux/amd64
  Experimental: false

docker info

 Running: 2
 Paused: 0
 Stopped: 4
Images: 43
Server Version: 18.03.1-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-20-generic
Operating System: Ubuntu 18.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.53GiB
Name: station01
ID: RJBW:4RWD:UFR5:PZUZ:TS47:QNJM:X54G:WY7J:LCMA:ODHW:LB5X:NQLQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
thishandp7 commented 6 years ago

I think this problem occurs because it couldn't find or create the config.json in home/.docker/. What I did was I renamed docker-credential-secretservice to something else and tried login in again. Then it created the config.json by itself and I was able to login to docker hub. This is where I found the temporary solution to this: https://stackoverflow.com/questions/50151833/cannot-login-to-docker-account

allbann76 commented 6 years ago

It helped me too. Thx!

d4ichi commented 6 years ago

Very helpful, I also had same issue on Ubuntu 18.04. Thanks a lot.

GabrielAdeyemi commented 6 years ago

Solution by Anish Varghese is the easiest on https://stackoverflow.com/questions/50151833/cannot-login-to-docker-account

Mediadom commented 5 years ago

sudo apt install gnupg2 pass

Work for me !

bobbyzholmes commented 5 years ago

@thishandp7 solution worked for me :+1:

mtijtsma commented 5 years ago

@Titom222 Works for me. Thnx! :+1:

1c7 commented 5 years ago

@Titom222 Works for me. (Using a Azure Ubuntu 18.04 machine with 8G memory)

nmaas87 commented 5 years ago

@Titom222 Works for me, same error on 18.04 LTS, headless

Ronan-Pikcio commented 5 years ago

@Titom222 it worked for me also. (Ubuntu 18.04.2 LTS on VMware)

hasseller commented 5 years ago

@Titom222 It works for me too and thanks to you. Good on you.

kindlychung commented 5 years ago

@Titom222 Still couldn't believe that worked...

0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
arminnajafi commented 5 years ago

@Titom222 Worked for me! Thanks. Jeez! How did you find this?!

solesensei commented 5 years ago

sudo apt install gnupg2 pass

not worked for me

Just reinit config.json work!

docker logout
mv ~/.docker/config.json ~/.docker/config_old.json
docker login
Santosh-Punase commented 5 years ago

@Titom222 Worked for me! Thanks.

saschaiseli commented 5 years ago

very helpful!!

Install the following Packages in ubuntu 18.04 fixed my issue

sudo apt install gnupg2 pass

marcusthelin commented 5 years ago

@saschaiseli That worked perfectly 🤙🏼Thanks a lot!

esenturion commented 5 years ago

sudo apt install gnupg2 pass

Work for me !

Also for me! Thanks!

kissme666 commented 5 years ago

sudo apt install gnupg2 pass

Work for me !

Thank you!👌

flavsdotpy commented 5 years ago

@Titom222 Works for me. Thnx! +1

sergeykitchen commented 5 years ago

@Titom222 It works! Thanks!

anhducbkhn commented 5 years ago

@Titom222 It works! Thanks

jeremyruffell commented 5 years ago

sudo apt install gnupg2 pass

Work for me !

Worked for me <3 thanks bro

andilabs commented 5 years ago

On Ubuntu Ubuntu 19.04

apt install pass

does a trick for me.

sairepaka commented 5 years ago

thanks timtom...it worked for me too :)

Dalez commented 5 years ago

sudo apt install gnupg2 pass

not worked for me

Just reinit config.json work!

docker logout
mv ~/.docker/config.json ~/.docker/config_old.json
docker login

Installing gnupg2 and pass didn't work for me either, but this did, thank you!

mehrdad-abdoli commented 5 years ago

@Titom222 Worked for me too :)

pcgeek86 commented 5 years ago

@Titom222 Thanks for the help! I had the same issue on an Ubuntu VM that I spun up using Canonical's multipass tool.

marcospds commented 5 years ago

It solved for me sudo apt-get remove docker-ce docker-ce-cli containerd.io sudo snap install docker

fatihyildizhan commented 5 years ago

On Ubuntu Ubuntu 19.04

apt install pass

does a trick for me.

If you are using Ubuntu 19.04, try this. Worked for me. Thanks

maheshshelke commented 5 years ago

I think this problem occurs because it couldn't find or create the config.json in home/.docker/. What I did was I renamed docker-credential-secretservice to something else and tried login in again. Then it created the config.json by itself and I was able to login to docker hub. This is where I found the temporary solution to this: https://stackoverflow.com/questions/50151833/cannot-login-to-docker-account

Thank You

wilian746 commented 5 years ago

sudo apt install gnupg2 pass

not worked for me

Just reinit config.json work!

docker logout
mv ~/.docker/config.json ~/.docker/config_old.json
docker login

is work for me Tnks

ievgenk commented 5 years ago

very helpful!!

Install the following Packages in ubuntu 18.04 fixed my issue

sudo apt install gnupg2 pass

Thank so much, helped me when trying to login to remote Docker on AWS. Using WSL2 Ubuntu 18.04

smalik-tc commented 5 years ago

It worked for me as well. Thank you

Kamapcuc commented 4 years ago

@Titom222 you saved my day! )

JakeDEvans commented 4 years ago

@krichter722 is a tool

akvadrako commented 4 years ago

This goes against the documented behaviour:

By default, Docker looks for the native binary on each of the platforms, i.e. “osxkeychain” on macOS, “wincred” on windows, and “pass” on Linux. A special case is that on Linux, Docker will fall back to the “secretservice” binary if it cannot find the “pass” binary. If none of these binaries are present, it stores the credentials (i.e. password) in base64 encoding in the config files described above.

I am on Linux but I have neither pass or secretservice installed.

vicking commented 4 years ago

sudo apt install gnupg2 pass

not worked for me

Just reinit config.json work!

docker logout
mv ~/.docker/config.json ~/.docker/config_old.json
docker login

On Ubuntu 19.10 just install pass and gnupg2 didn't work for me, but after moving config.json everything works. Thanks.

sergeypavlikhin commented 4 years ago

sudo apt install gnupg2 pass

not worked for me

Just reinit config.json work!

docker logout
mv ~/.docker/config.json ~/.docker/config_old.json
docker login

Works! Thx

goswamig commented 4 years ago

I have the same issue on macOS as well.

moueza commented 4 years ago

sudo apt install gnupg2 pass

Work for me !

Apt resolves for me too ! Thks

ahmeraziz95 commented 4 years ago

@Titom222 thanks a lot u save me a lot of time

wahbi commented 4 years ago

very helpful!!

Install the following Packages in ubuntu 18.04 fixed my issue

sudo apt install gnupg2 pass

this helped me , on my ubuntu 18.04 , thank you

iav commented 4 years ago

pass will be enough.

suhail1132 commented 4 years ago

@Titom222 It works for me. Thanks

vladox commented 4 years ago

see my answer in: https://stackoverflow.com/a/61970639/164374

sambacha commented 4 years ago

this leaves your password stored unencrypted in config.json

cjyothi commented 4 years ago

i had same problem Error saving credentials: error storing credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY

Solution:- cat /etc/docker/daemon.json { "insecure-registries" : [ "IP:8123" ] }

because

By default, Docker looks for the native binary on each of the platforms, i.e. “osxkeychain” on macOS, “wincred” on windows, and “pass” on Linux. A special case is that on Linux, Docker will fall back to the “secretservice” binary if it cannot find the “pass” binary. sudo apt-get install pass gnupg2


its works for me

micaellagouveia commented 4 years ago

@Titom222 Works for me too! (Linux Mint 19.3 Cinnamon)