Operation returned an invalid status Not Found error when creating ACR task

Igor Zlatomrezhev 20 Reputation points
2024-08-18T05:37:37.14+00:00

I am trying to create ACR task using following command:

az acr task create --name buildtask --registry walruzacr --context https://github.com/IgorZlatomrezhev/Azure-Samples.git --file MyTaskFile.yaml --schedule "*/5 * * * *" --git-access-token xxxxxx

It fails with following error: Operation returned an invalid status 'Not Found'

Information from debug mode:

Request https://management.azure.com:443 "PUT /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ContainerRegistry/registries/walruzacr/tasks/buildtask?api-version=2019-06-01-preview returns 404 with error:

{\"error\":{\"code\":\"ProviderCall\",\"message\":\"Failed to create webhook for repository: 'https://github.com/<acount-name>/Azure-Samples.git'. For more information on how to create source triggers see the tutorial https://aka.ms/acr/tasks/tutorial-git-trigger.. InnerErrors: Request:\",\"target\":\"GitHub\",\"details\":[{\"code\":\"Not Found\",\"message\":null,\"target\":null}]}}"

What am I doing wrong?

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
446 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Srinud 2,235 Reputation points Microsoft Vendor
    2024-08-20T13:50:50.5566667+00:00

    Hi Igor Zlatomrezhev,

    Thank you for reaching out to Microsoft Q&A forum.

    The Azure Container Registry task is attempting to create a webhook for a GitHub repository, but the repository or a required resource could not be found.

    To resolve this issue, please follow these troubleshooting steps:

    • Ensure that the GitHub repository URL is correct. Verify that the repository exists and is accessible. If it is a private repository, confirm that your credentials or access tokens are accurate and have the necessary permissions.
    • Confirm that the account or token used for the operation has sufficient permissions to create webhooks in the specified repository.
    • Please double-check that all required components are correctly referenced in your ACR task configuration.
    • Ensure that "walruzacr" is the correct name of your ACR registry, and that it matches the name in your Azure subscription.

    If the information is helpful, please consider by clicking the "Accept Answer & Upvote" on the post.

    0 comments No comments

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.