To migrate repositories from Azure DevOps to GitHub, you need sufficient access to the source (an organization on Azure DevOps) and the destination (an organization on GitHub). After you complete the steps in this article, your access and permissions will ready for your migration.
Decide who will perform the migration
If the person who will perform the migration is not a GitHub organization owner, a GitHub organization owner must first grant them the migrator role.
- If you're a GitHub organization owner, and intend to perform the migration yourself, you can continue reading this guide.
- If you wish to assign the migrator role to someone else, do that now. Then, the migrator should perform the rest of the steps in these guides. See Granting the migrator role.
Create a personal access token (classic) on GitHub
Next, you will need to create a personal access token (classic) which the ADO2GH extension of the GitHub CLI will use to communicate with GitHub. Les étendues requises pour votre GitHubpersonal access token (classic) rôle dépendent de votre rôle et de la tâche que vous souhaitez effectuer.
Remarque
Vous pouvez uniquement utiliser un personal access token (classic), pas un fine-grained personal access token. Cela signifie que vous ne pouvez pas utiliser GitHub Enterprise Importer si votre organisation utilise la stratégie « Restreindre personal access tokens (classic) l’accès à vos organisations ». Pour plus d’informations, consultez « Application de stratégies pour les jetons d’accès personnels dans votre entreprise ».
| Tâche | Propriétaire de l'organisation | Migrateur |
|---|---|---|
| Attribution du rôle de migrateur pour les migrations de dépôts | admin:org | |
| Exécution d’une migration de dépôts (organisation de destination) | ||
repo, , workflow``admin:org | ||
repo, , workflow``read:org | ||
| Téléchargement d’un journal de migration | ||
repo, , workflow``admin:org | ||
repo, , workflow``read:org | ||
| Récupération de mannequins | ||
repo, , workflow``admin:org |
To learn how to create the token, see Gestion de vos jetons d’accès personnels.
Create a Personal access token on Azure
Your Azure DevOps personal access token must have work item (read), code (read), and identity (read) scopes.
We recommend that you grant full access to your personal access token so you can use the inventory-report flag in phase 4.
If you want to migrate from multiple organizations, allow the personal access token to access all accessible organizations.
See Use personal access tokens in Microsoft Docs.
Configure IP allow lists on GitHub
If you use GitHub's IP allow list feature, you must add the GitHub IP ranges below to the allow list for the source and/or destination organizations.
If your destination organization is on GitHub.com, you will need to allow the following IP addresses:
- 192.30.252.0/22
- 185.199.108.0/22
- 140.82.112.0/20
- 143.55.64.0/20
- 135.234.59.224/28 (ajouté le 28 juillet 2025)
- 2a0a:a440::/29
- 2606:50c0::/32
- 20.99.172.64/28 (ajouté le 28 juillet 2025)
See Gestion des adresses IP autorisées pour votre organisation and Restriction du trafic réseau vers votre entreprise avec une liste d’adresses IP autorisées.
Temporarily configure your identity provider's (IdP) restrictions
If you use your IdP's IP allow list (such as Azure CAP) to restrict access to your enterprise on GitHub, you should disable these restrictions in your enterprise account settings until after your migration is complete.
Allow migrations to bypass repository rulesets
Si l’organisation de destination ou l’entreprise a des ensembles de règles activés, l’historique du référentiel migré peut violer ces règles. Pour autoriser la migration sans désactiver vos ensembles de règles, ajoutez « Migrations de référentiels » à la liste de contournement pour chaque ensemble de règles applicable. Ce contournement s’applique uniquement pendant la migration. Une fois terminés, les ensembles de règles seront appliqués à toutes les nouvelles contributions.
Pour configurer le contournement :
- Accédez à chaque ensemble de règles d’entreprise ou d’organisation.
- Dans la section « Liste de contournement », cliquez sur Ajouter un contournement.
- Sélectionnez Migrations de référentiels.
Pour plus d’informations, consultez « Création d'ensembles de règles pour les dépôts de votre organisation » et « Définition des contournements de ruleset pour les migrations de dépôts ».