Why do I get an authorization error from Docker when I'm trying to pull a public image?

Dancrumb picture Dancrumb · Jul 7, 2016 · Viewed 10.3k times · Source

When I tried to run

$ docker run -it ubuntu /bin.bash

I got the following error:

Unable to find image 'ubuntu:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/latest: unauthorized: incorrect username or password.
See 'docker run --help'.

Why am I getting an auth error when the ubuntu image is public?

Answer

Randy Larson picture Randy Larson · Sep 20, 2017

Docker for Windows --

repro docker pull redis

I received this error recently. My solution turned out to be doing a docker logout, which seemed to clear the credential entry slot related to docker hub (speculation). After this, my docker pull redis worked fine.