Tools to migrate git environments around, currently this is a quick powershell script to move from Bitbucket to Azure Devops
- git is installed and can be used from Powershell
- az cli tool and azure-devops extension are installed as below
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
# restart powershell
az extension add --name azure-devops
To migrate from a json file containing Bitbucket API output, run the script as follows, adjust values to your environment:
./Migrate-Bitbucket-to-AzureRepos.ps1 -organizationUri https://dev.azure.com/DevopsGoth/ -projectName "ado project" -jsonFile git_repos.json
You will need to have a Personal Access Token that provides authentication to git. Your environment should also be able to use 'git clone' on your original repositories (ie git credentials are set up), and access Azure DevOps correctly (accounting for organization proxy servers etc)