Skip to content

Instantly share code, notes, and snippets.

@anuragdhingra
Created May 18, 2020 10:43
Show Gist options
  • Save anuragdhingra/fd506fea00a2c64bd3954cc07305dce6 to your computer and use it in GitHub Desktop.
Save anuragdhingra/fd506fea00a2c64bd3954cc07305dce6 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
@MatteoOreficeIT
Copy link

MatteoOreficeIT commented Mar 16, 2023

@zenatuz
Copy link

zenatuz commented Oct 30, 2023

Clone with ssh:

az repos list | jq -r '.[].sshUrl' | while read sshUrl ; do git clone "${sshUrl}" ; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment