Unable to docker login through CLI - unauthorized: incorrect username or password
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
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 I was having the same issue and this fixed it for me, thanks!
@nick-freitas This fixed my issue too. Thanks for the clarification.
Thanks @nick-freitas .... Problem solved!
thanks solved here too!
Thanks for the clarification
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?
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!
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!
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.
imho, docker could either remove the email from the default username, or use email as login field if the user provides an email :P
How can I re-log in by CLI on Mac? I still have yo log into Docker with email.
docker login
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
@nick-freitas thanks... solved!
I admit I'm confused. Is CLI docker login separate from the GUI login?
@mcandre GUI and CLI is separated. If you loggged in by GUI, it doesn't mean you also logged in CLI
LOL ME TOO! what a trivial problem that could have cost me some serious time tytyty.
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.
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?