hub-feedback icon indicating copy to clipboard operation
hub-feedback copied to clipboard

Unable to docker login through CLI - unauthorized: incorrect username or password

Open subbu05 opened this issue 9 years ago • 137 comments

using CLI I am unable to login.

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: [email protected] Password: Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

OS MAC

docker version Client: Version: 1.13.0 API version: 1.25 Go version: go1.7.3 Git commit: 49bf474 Built: Wed Jan 18 16:20:26 2017 OS/Arch: darwin/amd64

Server: Version: 1.13.0 API version: 1.25 (minimum version 1.12) Go version: go1.7.3 Git commit: 49bf474 Built: Wed Jan 18 16:20:26 2017 OS/Arch: linux/amd64 Experimental: true

NOTE: I am able to login when I mention server name. docker login hub.docker.com Username ([email protected]): Password: Login Succeeded

Also I able to login using browser - https://id.docker.com/login

subbu05 avatar Jan 20 '17 21:01 subbu05

Your email and your docker id are 2 separate things. It looks like you can use your email to log in the site but not the CLI. To get your docker id log into https://www.docker.com/ with your email and password. On the top right is docker id. Use that in the CLI and you'll probably be fine.

nick-freitas avatar May 10 '17 03:05 nick-freitas

@nick-freitas I was having the same issue and this fixed it for me, thanks!

sandalle avatar Jul 09 '17 23:07 sandalle

@nick-freitas This fixed my issue too. Thanks for the clarification.

Rancho06 avatar Jul 17 '17 00:07 Rancho06

Thanks @nick-freitas .... Problem solved!

mojoblanco avatar Jul 21 '17 14:07 mojoblanco

thanks solved here too!

lanimall avatar Jul 28 '17 15:07 lanimall

Thanks for the clarification

tchcxp avatar Aug 02 '17 23:08 tchcxp

Just ran into this as well, perhaps this should be made clear in the CLI? It asks for "username", its not surprising that people try to reuse the credentials hub.docker.com is it?

petertiedemann avatar Aug 03 '17 17:08 petertiedemann

Just ran into this too on Docker for Mac - signed into the GUI using email address successfully, so assumed all fine but then CLI tools fail to pull images from dockerhub etc. Slightly confusing!

jamesfry avatar Aug 08 '17 17:08 jamesfry

Dear Docker developers: this distinction between ID and e-mail is quite 10 years old...please allow users successfully logged into the Docker GUI, automatically be logged when using the CLI...or at the very least allow them to use the default option you are suggesting which is their e-mail address. Thanks!

ClintEsteMadera avatar Aug 12 '17 19:08 ClintEsteMadera

FYI, on Mac, login using Docker ID on CLI is not good enough, you also need to login into the Docker for Mac GUI, then you can pull images. This is confusing too.

dchien234 avatar Aug 21 '17 07:08 dchien234

imho, docker could either remove the email from the default username, or use email as login field if the user provides an email :P

hagnat avatar Aug 27 '17 10:08 hagnat

How can I re-log in by CLI on Mac? I still have yo log into Docker with email.

sinramyeon avatar Sep 06 '17 01:09 sinramyeon

docker login

KWenn avatar Sep 07 '17 23:09 KWenn

I think this should allow me to set it as i would do if i was running docker normally.

I use Portainer.io and because of this I cannot get portainer to access the docker host its running on.

locahost:2375, 172.0.0.1:2375 or 192.168.192.1:2375 does not work from the container

andyliddle avatar Sep 20 '17 18:09 andyliddle

@nick-freitas thanks... solved!

rodoxx avatar Oct 09 '17 15:10 rodoxx

I admit I'm confused. Is CLI docker login separate from the GUI login?

mcandre avatar Oct 15 '17 01:10 mcandre

@mcandre GUI and CLI is separated. If you loggged in by GUI, it doesn't mean you also logged in CLI

sinramyeon avatar Oct 16 '17 00:10 sinramyeon

LOL ME TOO! what a trivial problem that could have cost me some serious time tytyty.

spoobert avatar Oct 28 '17 18:10 spoobert

If you login with your email in the GUI (on Docker for Mac), you'll see that in the menu item Repositories stays empty, and you cannot pull (like mentioned before). However, if you logout, and login with your Docker ID instead of your email, everything works fine. There is even no need to login separately in the CLI.

MetalArend avatar Nov 03 '17 16:11 MetalArend

Hello everyone. If I use docker login and step-by-step I'm providing a creds, then docker Login Succeeded. But if I'm doing the same via single command, like docker login -u -p, then I got an error. I have noted, that in the first case Docker uses https://index.docker.io/v1/ but in the second it's https://registry-1.docker.io/v2/, then Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password. Why this is happens?

dmitry-chisw avatar Nov 18 '17 13:11 dmitry-chisw