0
votes

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.

1
Are you sure that your SP is not expired? - Jean-Philippe Bond
Thank you! Just now update the SP. I believe it changes after a couple of hours. - AVS Kasturi Karthik
Do you solve the problem? If yes, please add an answer to display the solution. - Charles Xu

1 Answers

0
votes

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