/azure-git-mirror

Mirros all Git repos from your Azure Devops account.

Primary LanguageGo

Azure Devops Git Mirror

Mirros all Git repos from your Azure Devops account. Moves deleted to archive folder. Linux build can be found in the repo. Not tested on Windows.

Use -wiki to also download project wikis. If you get an error please check your PAT permissions.

What to do when the PAT expires? Sadly no solution yet since the PAT is added to the remote url. One possible way is to replace them with sed.

find . -name "config" -type f -exec sed -i '' -e 's/OLD_PAT/NEW_PAT/g' '{}' +

Features & TODOs

  • mirror Git accounts (git clone, then git pull)
  • handle empty repos
  • move deleted repos to archive folder
  • summary
  • Downloading project wikis with -wiki
  • handle expired PAT
  • handle PAT with missing permissions

Setup PAT token

Links