This is the containerized version of the migrator. It uses the migrate-mirror.ps1 script.
The easiest way to use this migration utility is to consume the public image on Docker Hub: n3wt0n/azdo2ghrepomigrator
docker pull n3wt0n/azdo2ghrepomigrator
To launch the container, you can use the following command:
docker run -it -e "AZDOPAT=xxx" -e "AZDOORG=xxx" -e "AZDOPRJ=xxx" -e "AZDOREPO=xxx" -e "GHPAT=xxx" -e "GHUSER=xxx" -e "GHREPO=xxx" n3wt0n/azdo2ghrepomigrator
See the 'Required Environment Variables'section below to know more about the Environment Variables you need to use.
If you instead prefer creating your own container image, follow these steps:
- Download or clone the whole repo
- Go to the "Docker" folder
- Launch the "buildImage.bat" or the "buildImage.sh" script to invoke the docker build command
If you prefer using the command manually against the Dockerfile make sure you are executing it on the root of the repo
The container needs the following environment variables (and values) to run.
- AZDOPAT: PAT (Personal Access Token) in Azure DevOps with the Code > Read permissions granted
- AZDOORG: name of the Azure DevOps Organization where your source repository resides (the XXX in dev.azure.com/XXX or XXX.visualstudio.com)
- AZDOPRJ: name of the Azure DevOps Team Project where the source repository resides
- AZDOREPO: name of the Azure DevOps Source Repository to migrate
- GHPAT: PAT (Personal Access Token) in GitHub with the repo (Full control) permmissions granted
- GHUSER: GitHub Username or (Organization) with which you have created the destination repository
- GHREPO: name of the GitHub Destination Repository
For instruction on how to generate a PAT in Azure DevOps, take a look at the official documentation here
For instruction on how to generate a PAT in GitHub, take a look at the official documentation here
Please note that the Destination Repo must be empty and not be initialized.