Migrating from Azure DevOps or GitHub
If you migrate from GitHub to GitHub or from Azure DevOps to GitHub, you can use the GitHub Enterprise Importer (GEI) (see https://github.com/github/gh-gei). It is an extension for the GitHub CLI and can be installed using extension install
:
$ gh extension install github/gh-gei
$ gh gei --help
You can set the Personal Access Tokens (PAT) as environment variables to authenticate to the source and target system:
$ export ADO_PAT=<personal access token>
$ export GH_SOURCE_PAT=<personal access token>
$ export GH_PAT=<personal access token>
You could also pass them to generate-script
using --github-source-pat
and --ado-pat
parameters.
To create the migration script, execute one of the following commands depending on whether you want to migrate from GitHub or Azure DevOps:
$ gh gei generate-script --ado-source-org <source> --github-target-org <target>
$ gh gei generate-script --github-source...