Credentials do not work for "docker login"

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.


@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