11

While login into docker account through I'm getting below error. The login is working fine in browser.

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:

After putting my password I'm getting below error in the terminal

Error saving credentials: error storing credentials - err: no credentials server URL, out: no credentials server URL

Can somebody please help?

Ananta Chandra Das
  • 1,865
  • 2
  • 14
  • 18

4 Answers4

11

Late to the party but I solved this issue:

TL;DR

run sudo apt install -y gnupg2 pass and try again


Issue

When running docker logout I got the following error message:

error getting credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY

Which led me to this StackOverflow post


Solution

The solution is to install some X11 tools and try again logging in:

sudo apt install -y gnupg2 pass
docker logout
docker login
Fipsi
  • 670
  • 1
  • 9
  • 21
  • 1
    Confirming that this solves a described issue on Ubuntu server images of AWS EC2 machines. – kuza Feb 17 '22 at 09:40
3

Simply remove docker-credential-osxkeychain file present in /usr/local/bin/ directory.

I renamed that file and it worked.

mv docker-credential-osxkeychain docker-credential-osxkeychain-backup

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 /Users/******/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

Ananta Chandra Das
  • 1,865
  • 2
  • 14
  • 18
1

In my case, using ubuntu 22.04.1, to solve it I had to run:

sudo apt install golang-docker-credential-helpers
ton
  • 3,827
  • 1
  • 42
  • 40
1

in my case ( Pop!_OS 22.04 LTS x86_64 ) I followed these steps,

gpg --generate-key

then

pass init <generated gpg-id public key>

after that,

docker login

make sure you have a docker hub account. for more details, see this Docker documentation.

ricekab
  • 630
  • 5
  • 17