Install and configure GitHub Enterprise Importer - GitHub Docs
https://docs.github.com/en/migrations/ado/install-and-configure-github-enterprise-importer • 170 KB fetched Open original page
Install and configure GitHub Enterprise Importer - GitHub Docs Skip to main content
GitHub Docs Version: Free, Pro, & Team
Search or ask Copilot Search or ask Copilot
Select language: current language is English
Search or ask Copilot Search or ask Copilot
Open menu
Collapse sidebar Expand sidebar
Scroll breadcrumbs left
* Home
* Migrations
* Migrate from Azure DevOps
* 3. Configure GitHub Enterprise Importer
Scroll breadcrumbs right
Migrations
*
*
* Overview
* GitHub's migration tooling
* Migrations within GitHub
* Plan your migration
* Migration paths
* Locked repositories
* Mannequins and user activity
* Programmatic repository imports
* Migrate from Azure DevOps
* Get started
* 1. Understand migrations
* 2. Manage access
* 3. Configure GitHub Enterprise Importer
* 4. Prepare to migrate
* 5. Migrate repositories
* 6. Follow-up tasks
* Key differences
* Migrate with GraphQL API
* Migrator role
* Import source code
* GitHub Importer
* About GitHub Importer
* Import a repository
* Command line
* About source code imports
* Local code
* External Git repo
* Subversion
* Mercurial
* Team Foundation Version Control
* GitHub Enterprise Importer
* Understand GitHub Enterprise Importer
* About GitHub Enterprise Importer
* Migrate from Bitbucket Server
* About migrations
* Overview of a migration
* Manage access
* Migrate repositories
* Migrate between GitHub products
* About migrations
* Overview of a migration
* Manage access
* Migrate from Enterprise Server
* Migrate repositories from GitHub.com
* Migrate organizations from GitHub.com
* Migrate from GitLab
* Get started
* 1. Understand migrations
* 2. Plan your migration
* 3. Manage access
* 4. Configure GitHub Enterprise Importer
* 5. Configure storage
* 6. Migrate repositories
* 7. Follow-up tasks
* Migrate with GraphQL API
* Migrator role
* Complete migration
* Access migration logs
* Reclaim mannequins
* Live migrations (GHES to GHE.com)
* About live migrations
* Prepare for your migration
* Migrate your repository
* Complete your migration
* Troubleshooting
* Migrated data reference
* ELM CLI reference
* ghe-migrator
* About ghe-migrator
* Export from GHES
* Export from GitHub.com
* Migrate data
* Troubleshoot migrations
* Troubleshoot migrations
Install and configure GitHub Enterprise Importer
Install the ADO2GH extension of the GitHub CLI and configure your environment for the migration.
Copy as Markdown
Run your migration
Article 3 of 6
Next : Prepare for your migration from Azure DevOps to GitHub
In this article
* Step 1: Install the ADO2GH extension of the GitHub CLI
* Step 2: Set environment variables
Step 1: Install the ADO2GH extension of the GitHub CLI
GitHub Enterprise Importer is a collection of extensions for GitHub CLI. If this is your first migration, you'll need to install GitHub CLI and the ADO2GH extension.
*
Install the GitHub CLI.
* For installation instructions for GitHub CLI, see the GitHub CLI repository .
* If you already have GitHub CLI installed, run gh --version to ensure you're running version 2.4.0 or newer. If you have an older version, visit the GitHub CLI repository for upgrade instructions.
*
Install the ADO2GH extension.
Shell gh extension install github/gh-ado2gh
gh extension install github/gh-ado2gh
*
The ADO2GH extension of the GitHub CLI is updated weekly. To make sure you're using the latest version, update the extension.
Shell gh extension upgrade github/gh-ado2gh
gh extension upgrade github/gh-ado2gh
Any time you need help with the ADO2GH extension, you can use the --help flag with a command. For example, gh ado2gh --help will list all the available commands, and gh ado2gh migrate-repo --help will list all the options available for the migrate-repo command.
Step 2: Set environment variables
Before you can use the ADO2GH extension to migrate to GitHub Enterprise Cloud, you must create personal access tokens that can access the source and destination organizations, then set the personal access tokens as environment variables.
*
Make sure you have your personal access tokens for both GitHub and Azure DevOps ready. See Manage access if you haven't already created a token.
*
Set environment variables for the personal access tokens, replacing TOKEN in the commands below with the personal access tokens you previously created. Use GH_PAT for the destination organization and ADO_PAT for the source organization.
*
If you're using Terminal, use the export command.
Shell export GH_PAT="TOKEN"
export ADO_PAT="TOKEN"
export GH_PAT="TOKEN"
export ADO_PAT="TOKEN"
*
If you're using PowerShell, use the $env command.
Shell $env:GH_PAT="TOKEN"
$env:ADO_PAT="TOKEN"
$ env :GH_PAT= "TOKEN"
$ env :ADO_PAT= "TOKEN"
*
If you're migrating to GitHub Enterprise Cloud with data residency, for convenience, set an environment variable for the base API URL for your enterprise.
Ensure you replace SUBDOMAIN with your enterprise's subdomain. For example, if your enterprise's subdomain is acme , the TARGET_API_URL value would be https://api.acme.ghe.com .
*
If you're using Terminal, use the export command.
Shell export TARGET_API_URL="https://api.SUBDOMAIN.ghe.com"
export TARGET_API_URL="https://api.SUBDOMAIN.ghe.com"
*
If you're using PowerShell, use the $env command.
Shell $env:TARGET_API_URL="https://api.SUBDOMAIN.ghe.com"
$ env :TARGET_API_URL= "https://api.SUBDOMAIN.ghe.com"
You'll use this variable with the --target-api-url option in commands you run with the GitHub CLI.
Up next
Prepare for your migration from Azure DevOps to GitHub
Step 3 of 6 in Run your migration
Back to top
Help and support
Was this Doc helpful?
Yes No
Help us make GitHub Docs great!
All Docs are open source. See something that's wrong or unclear? Submit a pull request.
Make a contribution
Still need help?
Ask the GitHub community Contact support Expert services Blog
GitHub Inc. © 2026 Terms Privacy Status Pricing
Links found on this page
- Skip to main content [direct]
- GitHub Docs [direct]
- Migrations [direct]
- Migrate from Azure DevOps [direct]
- GitHub's migration tooling [direct]
- Migrations within GitHub [direct]
- Plan your migration [direct]
- Migration paths [direct]
- Locked repositories [direct]
- Mannequins and user activity [direct]
- Programmatic repository imports [direct]
- 1. Understand migrations [direct]
- 2. Manage access [direct]
- 4. Prepare to migrate [direct]
- 5. Migrate repositories [direct]
- 6. Follow-up tasks [direct]
- Key differences [direct]
- Migrate with GraphQL API [direct]
- Migrator role [direct]
- About GitHub Importer [direct]
- Import a repository [direct]
- About source code imports [direct]
- Local code [direct]
- External Git repo [direct]
- Subversion [direct]
- Mercurial [direct]
- Team Foundation Version Control [direct]
- About GitHub Enterprise Importer [direct]
- About migrations [direct]
- Overview of a migration [direct]
- Manage access [direct]
- Migrate repositories [direct]
- About migrations [direct]
- Overview of a migration [direct]
- Manage access [direct]
- Migrate from Enterprise Server [direct]
- Migrate repositories from GitHub.com [direct]
- Migrate organizations from GitHub.com [direct]
- Get started [direct]
- 1. Understand migrations [direct]
- 2. Plan your migration [direct]
- 3. Manage access [direct]
- 4. Configure GitHub Enterprise Importer [direct]
- 5. Configure storage [direct]
- 6. Migrate repositories [direct]
- 7. Follow-up tasks [direct]
- Migrate with GraphQL API [direct]
- Migrator role [direct]
- Access migration logs [direct]
- Reclaim mannequins [direct]
- About live migrations [direct]
- Prepare for your migration [direct]
- Migrate your repository [direct]
- Complete your migration [direct]
- Troubleshooting [direct]
- Migrated data reference [direct]
- ELM CLI reference [direct]
- About ghe-migrator [direct]
- Export from GHES [direct]
- Export from GitHub.com [direct]
- Migrate data [direct]
- Troubleshoot migrations [direct]
- Run your migration [direct]
- GitHub CLI repository [direct]
- Manage access [direct]
- Make a contribution [direct]
- Ask the GitHub community [direct]
- Contact support [direct]
- Expert services [direct]
- Blog [direct]
- Terms [direct]
- Privacy [direct]
- Status [direct]
- Pricing [direct]
|
|