Skip to content

Instantly share code, notes, and snippets.

@treramey
Forked from anuragdhingra/AZURE_CLI.md
Created August 28, 2024 14:59
Show Gist options
  • Save treramey/ad433715f2f7d54c596d30e4f55656af to your computer and use it in GitHub Desktop.
Save treramey/ad433715f2f7d54c596d30e4f55656af to your computer and use it in GitHub Desktop.
Clone all your azure DevOps repositories in your organization at once using Azure CLI.
  1. Install Azure CLI
brew install azure-cli
  1. Add the DevOps CLI extension -
az extension add --name azure-devops
  1. Set your default organization and project -
az devops configure --defaults organization=https://dev.azure.com/myorg project=myproject
  1. Clone, all at once -
az repos list | jq -r '.[].webUrl' | while read webUrl ; do git clone "${webUrl}" ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment