When using the az acr build command to build an image from a remote Git repository, Azure Container Registry needs to authenticate with the Git provider to clone the repository.
Create a Personal Access Token in Azure DevOps: If you haven't done so already, create a PAT in Azure DevOps. The PAT should have permissions to read the repository.
Use the PAT in the repository URL: When specifying the URL of the Git repository in the az acr build command, include the PAT in the URL. The format should be like this: https://****@dev.azure.com/...**
az acr build -t example__image -f example__docker_file https://******@dev.azure.com/myname/reponame/_git/reponame