-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to docker login through CLI - unauthorized: incorrect username or password #935
Comments
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 |
@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? |
Yea, the UI is very badly done. It will seem to let you login using your email, but this is only logging you in to your Docker account on docker.com as I understand. It does not log you in with the docker hub, and the only indication you have that something is wrong is 1) on a Mac, your repositories menu is empty, and 2) if you try to do "things" that require being logged in with the docker CLI, it won't work. Instead, login with your docker ID (the username you specified when you signed up). Then everything works. (Why the UI lets you login using email is beyond me...) |
Not only for Mac, On my Windows 10 (Docker for Windows, Version 17.09.0-ce-win33 (13620), |
I also had this issue. (Windows 10) But I resolved this issue by using docker username instead of email at CLI. |
I had problem with my password, I used a password generator to create it and it worked fine on the browser, but on my mac on terminal it wouldn't let me login, the password was: `ZsM2y=3P5vEM\h , so I changed it to only letters and numbers and it worked |
the first answer solved my problem as well. Thank you! |
you can 'docker login' |
Thank you for solve my problem |
Thumbs up |
thanks @nick-freitas ... same error... same solution :) |
Thanks @nick-freitas . I relogged into docker with the docker ID that you referenced. And able to download now. thanks much. |
Thanks ! - I had the same problem on my macOS Mojave (version 10.14.4 ) but the help above advice helped. The problemEven running the command "docker run hello-world" was failing and giving the following error Worked using the following steps: -First start and login to your docker desktop app client
Now The login on the docker CLI using your terminal window (for this I used the my macuserid not the docker ID)
After that I could successfully run the command "docker run hello-world" Hope this helps basic users like me. |
Test docker login With modify Docker General Config (macOS High Sierra 10.13.3 & Docker Engine:18.09.2)1. With GUI Account login1.1 With General -> Securely store Docker logins in macOS keychain (checked)docker login failed1.2 With General -> Securely store Docker logins in macOS keychain (unchecked)docker login successedit will Authenticating with existing credentials. 2. With GUI Account logout2.1 With General -> Securely store Docker logins in macOS keychain (checked)docker login failed2.2 With General -> Securely store Docker logins in macOS keychain (unchecked)docker login successedSO, unchecked General->Securely store Docker logins in macOS keychain, it solved my docker login failed problem |
FYI, I tried logging in with |
It doesn't work :(
CLI doesn't
or
This one works:
|
Thanks ! You saved my day !! |
I still Don't Understand why or How They are different but I changed from Email to docker ID n it Worked, Thanks |
I was logged into CLI with my email and into GUI with my ID. Logged out from CLI and logged in with ID so both are using ID and all is well. Thanks! |
I just updated to 2.1.0.2 and had to uncheck the checkbox to be able to log in to docker from CLI again |
Solution
|
I've also got an issue to connect via CLI but in fact my error was to specify hub.docker.com. so by only using |
It works like a charm. I don't know why entering my plain password never worked. This is the real solution. You can use access token both for CLI and Docker Desktop login. |
FYI Second AUTH maybe affected on it. try without sec auth. |
I could not login from the command line, only the web. So I tried docker logout and got the response "# docker logout but I tried docker login again after that and it worked! |
I made an account using the Docker Hub Web page, with ID vxwcRj47WzPk7csC. My password was similar (a long bunch of jumbled characters). The Web page accepted this and allowed me to log in normally. But the CLI never worked with it. It always said, "Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password." I finally gave up and registered a separate account using very tame account name and password values, and everything worked. So, the CLI seems like it doesn't handle many credential values that the Web page accepts. Was Docker coded by beginners? |
Years later and this issue is not resolved... I was minding my own business, logged everywhere with my username (which I always use), when I "stupidly" tried a
Logged out, in, out, created an access token which deserves its description: "stupid need of access token"
And it's not the plugin, used that very one a few days ago to build and push an image. How is this an issue? How is this possible? EDIT: Used EDIT 2: This comment helped me with the "toomanyrequests" issue. How is this an issue!? May the Docker God be with you, guys. |
Found that on a linux standard docker install login requires root privileges. |
We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days. |
I got the same error when trying to login on Linux Debian. Although I did everything right. Maybe this will help anybody :) |
Thank you for your comment. Could you be more specific about where you are
installing this? Did you have to install it on the host machine or in the
Docker image or somewhere else?
--
Nancy Anthracite
On Friday, July 16, 2021 10:17:48 AM EDT naitsirch wrote:
I got the same error when trying to login on Linux Debian. Although I did
everything right.
Then I found [this answer](https://stackoverflow.com/a/52872140/1119601) and
after installing _gnupg2, pass and gpg_ (`sudo apt install gnupg2 pass gpg`)
the login worked.
…
Maybe this will help anybody :)
|
I had to install it on the host machine, which is current Debian stable, Buster. |
I just have the same issue.... after reading and trying multiple things suddenly I found that my DOCKER8HUB username starts with a capital letter whereas after logging it's a small letter.....what a way to deceive people for days |
I had the same issue. I registered docker as "Rueibin" when I tried to login as "Rueibin" I failed but I successfully logined in as "rueibin" |
@salprima Thank you very much, after reading so many comments that absolutely works ! |
I've registered for docker hub using my gmail and was not able to login in cli until I went into my account and chose to reset password, after that cli login works. |
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: USERNAME@gmail.com
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 (username@gmail.com):
Password:
Login Succeeded
Also I able to login using browser - https://id.docker.com/login
The text was updated successfully, but these errors were encountered: