Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (13.1k points)

I am trying to login to Azure Container Registry using docker login but, it throws an error:

Error response from daemon: Get https://myregistry.azurecr.io/v2/: unauthorized: authentication required

Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

First of all, you need to assign the right role for your service principal. And, after that once you assign the role and the service principal is ready. You can try using this command as an example:

docker login $ACR_NAME.azurecr.io -u $SP_APP_ID -p $SP_PASSWD

I hope this will help.

Want to become an Azure expert? join Azure Training now!!

Browse Categories

...