Skip to content

Instantly share code, notes, and snippets.

@MatteoOreficeIT
Last active March 16, 2023 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatteoOreficeIT/54888e3d11321e47a94c6d47212dfef0 to your computer and use it in GitHub Desktop.
Save MatteoOreficeIT/54888e3d11321e47a94c6d47212dfef0 to your computer and use it in GitHub Desktop.
Clone recusively all Azure DevOps repositories
#!/usr/bin/env bash
az devops project list | jq ".value[].name" -r | while read -r PROJECT ;
do
az repos list --project "$PROJECT" | jq ".[].remoteUrl" -r | while read -r GIT_URL ; do
rm -fr "$GIT_URL"
git clone "$GIT_URL"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment