- 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
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.
According to the doc, I am trying to create an Azure Pipeline for a repository hosted in an Azure Repo in the same project.
I am receiving the same error message as yours.
By specifying the arguments "yml-path", the operation is successful.
Sample:
Output: