skip to Main Content

When running the following command on Azure Cloud Shell getting the TasksOperationsNotAllowed error. How to fix?

Command:
az acr build –registry $REGISTRYNAME –image expressimage .

Errror:
(TasksOperationsNotAllowed) ACR Tasks requests for the registry and 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 and are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance. Target: request

When running the following command on Azure Cloud Shell getting the TasksOperationsNotAllowed error. How to resolve?

Command:
az acr build –registry $REGISTRYNAME –image expressimage .

Errror:
(TasksOperationsNotAllowed) ACR Tasks requests for the registry and 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 and are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance. Target: request

2

Answers


  1. The error message "TasksOperationsNotAllowed" occurs when ACR Tasks requests for the registry and password are not permitted. To resolve this issue, you need to check if the user account used to authenticate the Azure CLI has the required permissions to perform ACR tasks. If the user account does not have the required permissions, you need to grant the necessary permissions to the user account. You can also try logging out and logging back in to the Azure CLI to refresh the authentication token. You need to enable the "Admin user" option for the container registry. This option allows you to authenticate with the registry using a username and password. To enable this option, follow these steps:

    1. Go to the Azure portal and navigate to your container registry.
    2. Click on "Access keys" under "Settings".
    3. Toggle the "Admin user" option to "Enabled".
    4. Copy the username and password values displayed on the page.
    5. Use these values to authenticate with the registry in your command.
      enter image description here

    or from Az CLI az acr build --registry $REGISTRYNAME --image expressimage --username <username> --password <password> .

    Once done, you can push your image into you registry and deploy accordingly

    az login
    az acr login --name <youracrname>
    docker tag <the_name_you_want_to_show_in_ACR> <youracrname>.azurecr.io/<the_image_name_which_you_built>
    
    docker push <youracrname>.azurecr.io/<the_name_you_want_to_show_in_ACR> 
    
    

    enter image description here

    enter image description here

    References:

    Login or Signup to reply.
  2. Heyy
    I followed this instruction:
    az acr build –registry $REGISTRYNAME –image expressimage –username –password .
    But received eunrecognized arguments: –username chasexxxxxx –password xxxxxxxxxxxxx
    How to deal with this? qaq

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search