Trying to run
docker-compose up or a docker container through the CLI but getting a mysterious error:
unauthorized: incorrect username or password? Yea me too, it was highly annoying but I was able to fix it.
- Unable to pull images in the docker CLI tool
- Unable to login into docker hub via the CLI command
The problem is that the Docker Mac GUI will allow you to login to your DockerHub account with your email address. However the Docker CLI only accepts Docker ID’s as valid credentials.
- Log out of the Docker GUI on Mac by clicking the toolbar icon and selecting “: sign out”
- Sign back into Docker GUI with your Docker ID. Your Docker ID is your Docker username, not your email address.
- After signing back in, run
docker login. The Docker CLI will automatically use the Docker GUI credentials.
Check out the ever growing Github Issue on this topic for more information.