Reputation: 77
I am trying to build a gitlab-ci pipeline and push the build image to acr from gitlab. I am using the command
docker login ****.azurecr.io --username 00000000-0000-0000-0000-000000000000 --password EXPOSE_TOKEN
It has worked before many times but this time it is not working.
I am getting the error :
'Error response from daemon: Get https://****.azurecr.io/v2/: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.`
I am also tying to deploy the image to aks but getting the same error. I have executed my pipeline many times and this is the first time that I am getting this error.
Upvotes: 0
Views: 787
Reputation: 77
Update
The issue got resolved after I updated the expose-token value. The value of expose-token gets changed at regular intervals. This was the same issue I faced, I updated my command with the new value and it worked fine.
Just for info: To get the value of the expose-token please run the below command in your azure cli
az acr login --name <acr-username> --expose-token
Upvotes: 0