skip to Main Content
  • I installed az cli and azure-devops extension.
>> az --version
azure-cli                         2.44.1

core                              2.44.1
telemetry                          1.0.8

Extensions:
azure-devops                      0.25.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource             21.1.0b1

Python location 'C:Program Files (x86)Microsoft SDKsAzureCLI2python.exe'
  • set the default configuration for organization and project using

az devops configure --defaults organization=<org> project=<project>

  • Run the following command
> az pipelines create --name 'MyCi'
Error: The following arguments are required: --repository 

However according to MicrosoftDoc the –repository parameter is Optional

  • I am new to DevOps and don’t know much about the devops-cliI.I try the full command.
> az pipelines create --name 'NameCI' --description 'pipeline for project' --repository AzureRepo
--branch main --repository-type tfsgit
Error: Page not found.  Operation returned a 404 status code.
  • I can successfully create pipelines from browser
  • I can delete pipelines from azure devops-cli but I cannot create pipelines.

2

Answers


  1. You can’t create pipelines from Azure DevOps CLI. There is no command az pipelines create thats why it returned Page not found. Operation returned a 404 status code.

    Login or Signup to reply.
  2. According to the doc, I am trying to create an Azure Pipeline for a repository hosted in an Azure Repo in the same project.

    az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project' --repository SampleRepoName --branch master --repository-type tfsgit
    

    I am receiving the same error message as yours.

    By specifying the arguments "yml-path", the operation is successful.

    enter image description here

    Sample:

    az pipelines create --name 'CreatedByCLI' --yml-path /azure-pipelines.yml --repository AzureCLIrepo --branch main --repository-type tfsgit
    

    enter image description here

    Output:

    enter image description here

    enter image description here

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