Unauthorized: incorrect username or password

I have just started with Docker on Windows 10: Docker version 17.06.0-ce, build 02c1d87

On issuing the docker run hello-world to test things out I get:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world
/manifests/latest: unauthorized: incorrect username or password.

I can search docker hub so it isn’t that username/password that is incorrect.

Anyone know what’s up?

1 Like

I am also seeing this:

docker version
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:30:30 2017
OS/Arch: windows/amd64
Error response from daemon: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Tls or ssl need just i think
In my case of linux
Made
etc/docker/daemon.json

Search about it on the google

1 Like

Leaving this here for posterity, since I ran into the same issue, and this was the topmost search result.

For the record, I encountered this error running Docker on Windows.

While the Docker client was running the in the system tray, and was showing me as logged in, I got the unauthorized: incorrect username or password error.

When I right-clicked on the system tray icon, it showed me as logged in, with a context menu item similar to username@domain.com: Sign out, the issue is that you must login to Docker using your hub username, which is different than your email address, even though in some cases, both are interchangeable.

You can do this by signing out from the system tray icon, or by logging in at a command prompt, using the syntax docker login --username your_username_here.

If you’re not sure of your username, you can login to the Docker Hub, and your username will be displayed on the far right hand side of the menu bar, next to “Dashboard”, “Explore” and such.

61 Likes

Hi All,

Same happened to me(OSX). Two things to try

First, do:

docker logout

Then if you are sure that you are putting CORRECT username & password,
DONOT put email address as “username” when login from CLI. Instead USE username of you account

~Cheers :slight_smile:

12 Likes

Thanks for this!

I have a little environment on my mac, working fine, tried to setup an environment on a Windows box sitting behind a proxy and was not getting anywhere. Having access to the proxy (squid) I was looking at access logs and was sure it was a squid issue before finding this very useful post.

(sorry to squid as well, for doubting you…)

Whales and squid, is that a good idea to have them in such close quarters? :wink:

1 Like

yeap, this was my issue on a Mac. signed in using my username instead of my email and it worked.

1 Like

Thankyou, this solved my problem! Use username instead of email to login! :wink:

Speaking from posterity: Thanks! This solved my issue on Mac.

On Windows the proposed solution did not work. I did docker logout on the command line and tried to log in using docker login --username myusername. Did not work, even though the password was correct. What did work was logging out of docker via the icon in the status bar (bottom right corner of the screen) and logging back in via that same status bar, but now using my username instead of my email address.

Thanks!

I faced this issue on Windows 10. Applied your approach partially - did not have to sign out from the Docker client. Logging from Windows CLI with Docker hub user ID was sufficient.

Thank you !! This literally worked for Mac user too !! :slight_smile:

This worked for me as well… Used my username instead of my email ID (These were different at registration time) and it worked OK. Thanks!

1 Like

Thank you @antopjoseph for your solution, i have used it and it worked.

1 Like

Thanks a lot!!
But I thought remember that before you could get images without log on, I think, right?

Thanks! It happened on my mac after docker installed following the tutorial.

As mentioned by @hugodahl you have to sign in with username instead of email. But strangely you have as well to write user name in lower case !!!

1 Like

Thanks, your solution works.
Using macOS Majave, having this error out of nowhere. When I logged out of the docker app tray, it started working. I logged back in using my username and no problems, so far.

Encountered this Docker version 18.09.0, build 4d60db4 (Docker for Windows).

I signed into Docker via the UI after doing a Factory Reset of the installation. I used my email accidentally (it requests username of course), but it still worked? At least the UI disappeared.

On my next docker-compose pull: unauthorized: incorrect username or password

Docker logout / login via the CLI with the correct username corrected the issue.

Still weird that the login UI accepted my obviously invalid input.