Fixing Docker error unauthorized: incorrect username or password

Jan 4, 2019

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.

Symptoms

Unable to pull images in the docker CLI tool

Unable to login into docker hub via the CLI command docker login

Solution

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”