Prerequisite
You must have Azure CLI version 2.0.49 or later installed in your machine. If it is not installed follow the instructions here to get it installed. You can verify the version of Azure CLI installed by executing below command.
az --version
az extension add –n azure-devops
Once the extension added you can execute az --version and the installed extensions will be also listed.
Using Azure DevOps Command Line
Login using below command.
az login
Then you can execute Azure DevOps commands providing the organization name and the team project name. For example to list all repos in a team project you can execute below command.
az repos list --org 'https://dev.azure.com/yourorg' -p 'yourproject'
az devops configure -d 'organization=https://dev.azure.com/yourorg 'project=yourproject'
Then you can execute repos list command without org or project arguments.
az repos list
To get help on the commands you can add -h. For example see below commands help.
- az devops –h
- az devops configure –h
- az repos list -h
No comments:
Post a Comment