While running docker commands with some images, I started getting error:

unauthorized: incorrect username or password.

The cause for this is you might have a login to docker hub sometime ago. But, while normal docker commands, you dont need to login to docker hub, while getting images from docker hub.

Solution to problem

You need to logout from docker hub. Run following command:

docker logout

It will show something like: Removing login credentials for https://index.docker.io/v1/

Now, run original command.


Thanks for reading