Docker login issue

docker login ip:registry port no -u -p used this command to login .

Error response from daemon: login attempt failed , failed with status: 401 unauthorized

How to resolve this?

Hello @kb48815,

The error message clearly said that your command missing the username & password parameters.
Are you following a lab or just trying locally?


Hello @trung-kodekloud ,

I gave username and password in my login command after that i’m getting this error.

docker login ip:registry port no -u un -p pwd

Does it happen in the KodeKloud lab or your local environment, can you share more about the context?
Some screenshots would be helpful.


I’m working on local environment @trung-kodekloud

@trung-kodekloud please refer to screenshot!

The status code is quite clear, double check your credentials and make sure it is correct.
This link may help: Docker login problems - Stack Overflow