cli icon indicating copy to clipboard operation
cli copied to clipboard

Error saving credentials: error storing credentials in Ubuntu 18.04 LTS

Open thishandp7 opened this issue 7 years ago • 67 comments

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

thishandp7 avatar Jun 21 '18 07:06 thishandp7

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

allbann76 avatar Jun 22 '18 09:06 allbann76

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

thishandp7 avatar Jun 22 '18 18:06 thishandp7

It helped me too. Thx!

allbann76 avatar Jun 25 '18 09:06 allbann76

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

d4ichi avatar Jun 28 '18 17:06 d4ichi

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

GabrielAdeyemi avatar Oct 25 '18 07:10 GabrielAdeyemi

sudo apt install gnupg2 pass

Work for me !

Mediadom avatar Feb 01 '19 08:02 Mediadom

@thishandp7 solution worked for me :+1:

bobbyzholmes avatar Feb 03 '19 11:02 bobbyzholmes

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

mtijtsma avatar Feb 12 '19 15:02 mtijtsma

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

1c7 avatar Feb 14 '19 07:02 1c7

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

nmaas87 avatar Feb 15 '19 17:02 nmaas87

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

Ronan-Pikcio avatar Feb 21 '19 08:02 Ronan-Pikcio

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

hasseller avatar Feb 28 '19 18:02 hasseller

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

0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

kindlychung avatar Mar 05 '19 11:03 kindlychung

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

arminnajafi avatar Mar 09 '19 10:03 arminnajafi

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

solesensei avatar May 12 '19 16:05 solesensei

@Titom222 Worked for me! Thanks.

Santosh-Punase avatar May 22 '19 11:05 Santosh-Punase

very helpful!!

Install the following Packages in ubuntu 18.04 fixed my issue

sudo apt install gnupg2 pass

saschaiseli avatar May 22 '19 21:05 saschaiseli

@saschaiseli That worked perfectly 🤙🏼Thanks a lot!

marcusthelin avatar May 31 '19 18:05 marcusthelin

sudo apt install gnupg2 pass

Work for me !

Also for me! Thanks!

esenturion avatar Jun 05 '19 22:06 esenturion

sudo apt install gnupg2 pass

Work for me !

Thank you!👌

kissme666 avatar Jun 09 '19 15:06 kissme666

@Titom222 Works for me. Thnx! +1

flavsdotpy avatar Jul 04 '19 18:07 flavsdotpy

@Titom222 It works! Thanks!

sergeykitchen avatar Jul 18 '19 16:07 sergeykitchen

@Titom222 It works! Thanks

anhducbkhn avatar Jul 24 '19 04:07 anhducbkhn

sudo apt install gnupg2 pass

Work for me !

Worked for me <3 thanks bro

jeremyruffell avatar Jul 26 '19 09:07 jeremyruffell

On Ubuntu Ubuntu 19.04

apt install pass

does a trick for me.

andilabs avatar Jul 29 '19 13:07 andilabs

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

sairepaka avatar Aug 02 '19 14:08 sairepaka

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!

Dalez avatar Aug 02 '19 15:08 Dalez

@Titom222 Worked for me too :)

mehrdad-abdoli avatar Aug 04 '19 09:08 mehrdad-abdoli

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

pcgeek86 avatar Aug 05 '19 13:08 pcgeek86

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

marcospds avatar Aug 22 '19 14:08 marcospds