- Install Azure CLI
brew install azure-cli
- Add the DevOps CLI extension -
az extension add --name azure-devops
- Set your default organization and project -
az devops configure --defaults organization=https://dev.azure.com/myorg project=myproject
- Clone, all at once -
az repos list | jq -r '.[].webUrl' | while read webUrl ; do git clone "${webUrl}" ; done
If you have ssh keys set up you can alternatively use
az repos list | jq -r '.[].sshUrl' | while read sshUrl ; do git clone "${sshUrl}" ; done
I found this easier so I didn't have to keep authenticating for each project.