How to fix TasksOperationNotAllowed

Amit Kumar 5 Reputation points
2024-07-17T17:18:04.62+00:00

az acr build --registry $ACR_NAME --image helloacrtasks:v1 .
Running this command it is giving error

Packing source code into tar to upload...
Uploading archived source code from '/tmp/build_archive_88b3575a892046a989d411d7ea2641e4.tar.gz'...
Sending context (20.238 KiB) to registry: amitazuredemoacr...
(TasksOperationsNotAllowed) ACR Tasks requests for the registry amitazuredemoacr and 8c8448a7-a668-4c29-a240-251744f7c8da are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.
Code: TasksOperationsNotAllowed
Message: ACR Tasks requests for the registry amitazuredemoacr and 8c8448a7-a668-4c29-a240-251744f7c8da are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.
Target: request

I don't know why error , as we have to only have a Dockerfile and nothing else.Also tried authentication using az login , az acr login . But the result is same.
Please help

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
2,030 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RDash 2,490 Reputation points Microsoft Vendor
    2024-07-18T10:44:10.2833333+00:00

    Hi Amit Kumar ,

    We apologize for any inconvenience you may have experienced issue while trying the exercise of Microsoft Learn path.

    When you use this command on Azure Cloud Shell:

    az acr build --registry $REGISTRYNAME --image expressimage you get an error:

    (TasksOperationsNotAllowed) ACR Tasks requests for the registry <containerRegistryName> and <password> are not permitted.

    Customer shared -

    Here are the few steps for using Docker CLI commands :

    1.I discovered a workaround using Docker CLI commands.

    2.Login to the ACR using az acr login -n $ACRNAME -p <password>

    Tag the image first- docker tag <image name>:latest <ACR registry name>.azurecr.io/<image name>

    3.Push the image to ACR from docker - docker push <ACR registry name>.azurecr.io/<image name>

    The images will now appear in your ACR - az acr repository list --name $ACRNAME --output table

    Here is the referral link: https://stackoverflow.com/questions/77982084/how-to-fix-tasksoperationsnotallowed-acr-tasks-requests-for-the-registry-cont#:~:text=The%20error%20message%20%22TasksOperationsNotAllowed%22%20occurs%20when%20ACR%20Tasks,has%20the%20required%20permissions%20to%20perform%20ACR%20tasks. Please let us know if they were helpful and don't hesitate to reach out to us if you face any issue.

    Thank you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.