Copy/pasting my username and password into the Docker Hub website works fine.
The password is long, but does not contain shell-breaking symbols.
Copy/pasting those same credentials into command-line docker login
results in an incorrect username or password
error. I have tried passing the credentials interactively (both copy/pasting and typing) and through command line args, same result:
# INTERACTIVE
$ 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: <REDACTED>
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
# COMMAND LINE
$ docker login -u [email protected] -p <REDACTED>
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
If you ever change your Windows password, you'll want to head over to your Docker for Windows settings, shared drives, then click “Reset Credentials” under your shared drives.
@mustaccio was correct.
The Docker Hub website allows you to login with either your username OR your email, and the website does not require a case-correct username.
docker login
DOES require a case-correct username, and DOES NOT work with your email address.
When I signed up I chose a camel-cased username e.g.:
MyUsername
Docker forces this username to all lower case in practice. When you log in, you'll see your correct username in the upper right-hand corner of the website. In this example:
myusername
The website allows you to login with MyUsername or myusername.
docker login
only allows myusername.
Same issue happens if you didn't logout and if you have put EMAIL address for login.
docker logout
docker login
DONOT PUT EMAIL ADDRESS, instead ENTER USERNAME
I used a password generator that put special characters in my password, I was able to login in my browser but not through the cli. I changed it to just letters and numbers and it worked.
Try this:
sudo chmod 666 /var/run/docker.sock
sudo docker login
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With