diff --git a/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md b/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md index e306905bac..bdf2141284 100644 --- a/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md +++ b/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md @@ -41,7 +41,7 @@ People with read access to a repository can access the migration log for the rep ## Downloading a repository migration log with the {% data variables.product.prodname_cli %} -Organization owners and people with the migrator role can download migration logs using the {% data variables.product.prodname_cli %}. For more information about the migrator role, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +Organization owners and organization members with the migrator role can download migration logs using the {% data variables.product.prodname_cli %}. You can download the latest migration log for an individual repository with the `download-logs` command. The exact command depends on your migration source. diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md index de79375eed..e3ba5e9398 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md @@ -10,6 +10,8 @@ redirect_from: - /early-access/github/migrating-with-github-enterprise-importer/running-a-migration-with-github-enterprise-importer/managing-access-for-github-enterprise-importer - /early-access/enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/managing-access-for-github-enterprise-importer - /migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/managing-access-for-github-enterprise-importer + - /early-access/enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer + - /migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer --- ## About required access for {% data variables.product.prodname_importer_proper_name %} @@ -28,9 +30,22 @@ Additionally, if you use IP allow lists with the source or destination, you may If you're migrating from {% data variables.product.prodname_ghe_server %} 3.8 or higher for the first time, you also need someone with access to the {% data variables.enterprise.management_console %} to set up blob storage for {% data variables.location.product_location_enterprise %}. +## About the migrator role + +{% data reusables.enterprise-migration-tool.about-the-migrator-role %} + +{% note %} + +**Notes:** +- If you're migrating a repository between two organizations on {% data variables.product.prodname_dotcom_the_website %}, you can grant the migrator role to the same person or team for both organizations, but you must grant each separately. +- You cannot grant the migrator role for enterprise accounts. Therefore, you can only run an organization migration if you're an owner of the destination enterprise. However, you can grant the migrator role to that enterprise owner for the source organization. +- The {% data variables.product.prodname_cli %} does not support granting the migrator role for organizations on {% data variables.product.prodname_ghe_server %}, so you must be an organization owner of the source organization to migrate repositories from {% data variables.product.prodname_ghe_server %}. + +{% endnote %} + ## Required roles -For the source and destination of the migration, different roles are required for different tasks. For some tasks, you can grant the migrator role to a user or team. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +For the source and destination of the migration, different roles are required for different tasks. ### Source organization @@ -76,6 +91,31 @@ Reclaiming mannequins | {% octicon "dash" aria-label="Not applicable" %} | `admi Running a migration (source organization) | {% octicon "dash" aria-label="Not applicable" %} | `read:org`, `repo` | `read:org`, `repo` | Running an organization migration (destination enterprise) | `read:enterprise`, `admin:org`, `repo`, `workflow` | {% octicon "dash" aria-label="Not applicable" %} | {% octicon "dash" aria-label="Not applicable" %} | +## Granting the migrator role + +To allow someone other than an organization owner to run a repository migration or download migration logs, you can grant the migrator role to a user or team. For more information, see "[About the migrator role](#about-the-migrator-role)." + +You can grant the migrator role using either the {% data variables.product.prodname_gei_cli %} or the GraphQL API. + +- "[Granting the migrator role with the {% data variables.product.prodname_gei_cli_short %}](#granting-the-migrator-role-with-the-ado2gh-extension)" +- "[Granting the migrator role with the GraphQL API](#granting-the-migrator-role-with-the-graphql-api)" + +### Granting the migrator role with the {% data variables.product.prodname_gei_cli_short %} + +To grant the migrator role using the CLI, you must have installed the {% data variables.product.prodname_gei_cli %}. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud#step-1-install-the-gei-extension-of-the-github-cli)." + +1. On {% data variables.product.prodname_dotcom_the_website %}, create and record a {% data variables.product.pat_generic %} that meets all the requirements for granting the migrator role. For more information, see "[Creating a {% data variables.product.pat_generic %} for {% data variables.product.prodname_importer_proper_name %}](#creating-a-personal-access-token-for-github-enterprise-importer)." +{% data reusables.enterprise-migration-tool.grant-migrator-role-pat %} +1. Use the `gh gei grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`. + + ```shell copy + gh gei grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE + ``` + +### Granting the migrator role with the GraphQL API + +{% data reusables.enterprise-migration-tool.grant-migrator-role-graphql %} + ## Creating a {% data variables.product.pat_generic %} for {% data variables.product.prodname_importer_proper_name %} {% data reusables.enterprise-migration-tool.creating-a-pat-steps %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md index b84cb91a16..5bff48a4f0 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md @@ -27,7 +27,7 @@ redirect_from: ## Prerequisites {% data reusables.enterprise-migration-tool.migration-prerequisites %} -- For the source organization, you must be an organization owner or have the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +- For the source organization, you must be an organization owner or have the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#about-the-migrator-role)." - For the destination enterprise account, you must be an enterprise owner. {% api %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md index 359a3e25a5..e579328641 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md @@ -50,7 +50,7 @@ To migrate your repositories from {% data variables.product.prodname_ghe_server ## Prerequisites {% data reusables.enterprise-migration-tool.migration-prerequisites %} -- You must be either an organization owner or be granted the migrator role for both the source and destination organizations. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +- In both the source and destination organizations, you must be either an organization owner or be granted the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#about-the-migrator-role)." - If you use {% data variables.product.prodname_ghe_server %} 3.8 or higher, you need access to the {% data variables.enterprise.management_console %}. {% api %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md index 373a23938c..36bdef97e8 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md @@ -27,7 +27,7 @@ redirect_from: ## Prerequisites {% data reusables.enterprise-migration-tool.migration-prerequisites %} -- You must be either an organization owner or be granted the migrator role for both the source and destination organizations. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +- In both the source and destination organization, you must be either an organization owner or be granted the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#about-the-migrator-role)." {% api %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md index 65abc460a3..6eba448ac7 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md @@ -78,7 +78,7 @@ To migrate an organization, you must be an organization owner for the source org Additionally, you must be an enterprise owner on the destination enterprise account. You cannot grant the migrator role for enterprise accounts. 1. Confirm that the person who will run your migrations is an enterprise owner of the destination enterprise account. -1. If that person is not an organization owner for the source organization, grant them the migrator role for the organization. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +1. If that person is not an organization owner for the source organization, grant them the migrator role for the organization. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#about-the-migrator-role)." {% data reusables.enterprise-migration-tool.confirm-migrator-has-correct-pats %} For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)." #### Deciding who will run repository migrations @@ -86,7 +86,7 @@ Additionally, you must be an enterprise owner on the destination enterprise acco To migrate a repository, you must be an organization owner for both the source organization and the destination organization, or an organization owner must grant you the migrator role for each organization where you're not an owner. 1. Decide whether you want an organization owner to perform your migrations, or whether you need to grant the migrator role to someone else. -{% data reusables.enterprise-migration-tool.grant-migrator-tasks %} +{% data reusables.enterprise-migration-tool.grant-migrator-tasks %} For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#about-the-migrator-role)." {% note %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md index e553b98782..9aa9556b2d 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md @@ -21,9 +21,13 @@ To migrate a repository from Azure DevOps to GitHub, you need sufficient access Additionally, if you use IP allow lists with the source or destination, you may need to configure the allow lists to allow access by {% data variables.product.prodname_importer_proper_name %}. +## About the migrator role + +{% data reusables.enterprise-migration-tool.about-the-migrator-role %} + ## Required roles for {% data variables.product.company_short %} -For the destination organization on {% data variables.product.prodname_dotcom %}, different roles are required for different tasks. For some tasks, you can grant the migrator role to a user or team. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +For the destination organization on {% data variables.product.prodname_dotcom %}, different roles are required for different tasks. {% data reusables.enterprise-migration-tool.gei-required-roles %} @@ -43,6 +47,31 @@ Your Azure DevOps {% data variables.product.pat_generic %} must have `work item If you want to migrate from multiple organizations, allow the {% data variables.product.pat_generic %} to access all accessible organizations. For more information, see [Use {% data variables.product.pat_generic %}s](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page#create-a-pat) in Microsoft Docs. +## Granting the migrator role + +To allow someone other than an organization owner to run a migration or download migration logs, you can grant the migrator role to a user or team. For more information, see "[About the migrator role](#about-the-migrator-role)." + +You can grant the migrator role using either the {% data variables.product.prodname_ado2gh_cli %} or the GraphQL API. + +- "[Granting the migrator role with the {% data variables.product.prodname_ado2gh_cli_short %}](#granting-the-migrator-role-with-the-ado2gh-extension)" +- "[Granting the migrator role with the GraphQL API](#granting-the-migrator-role-with-the-graphql-api)" + +### Granting the migrator role with the {% data variables.product.prodname_ado2gh_cli_short %} + +To grant the migrator role using the CLI, you must have installed the {% data variables.product.prodname_ado2gh_cli %}. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud#step-1-install-the-ado2gh-extension-of-the-github-cli)." + +1. On {% data variables.product.prodname_dotcom_the_website %}, create and record a {% data variables.product.pat_generic %} that meets all the requirements for granting the migrator role. For more information, see "[Creating a {% data variables.product.pat_generic %} for {% data variables.product.prodname_dotcom %}](#creating-a-personal-access-token-for-github)." +{% data reusables.enterprise-migration-tool.grant-migrator-role-pat %} +1. Use the `gh ado2gh grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`. + + ```shell copy + gh ado2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE + ``` + +### Granting the migrator role with the GraphQL API + +{% data reusables.enterprise-migration-tool.grant-migrator-role-graphql %} + ## Creating a {% data variables.product.pat_generic %} for {% data variables.product.prodname_dotcom %} {% data reusables.enterprise-migration-tool.creating-a-pat-steps %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md index 0e18d877c4..5d0590e9df 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md @@ -27,7 +27,7 @@ redirect_from: ## Prerequisites {% data reusables.enterprise-migration-tool.migration-prerequisites %} -- For the destination organization on {% data variables.product.prodname_dotcom_the_website %}, you need to be an organization owner or have the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +- For the destination organization on {% data variables.product.prodname_dotcom_the_website %}, you need to be an organization owner or have the migrator role. For more information about the migrator role, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#about-the-migrator-role)." {% api %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/overview-of-a-migration-from-azure-devops-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/overview-of-a-migration-from-azure-devops-to-github-enterprise-cloud.md index 13461d71f3..ecb2016e60 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/overview-of-a-migration-from-azure-devops-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/overview-of-a-migration-from-azure-devops-to-github-enterprise-cloud.md @@ -64,7 +64,7 @@ Service hooks are not migrated from ADO, so you will need to recreate them separ To migrate a repository, you must be an organization owner for the destination organization, or an organization owner must grant you the migrator role. 1. Decide whether you want an organization owner of the destination organization to perform your migrations, or whether you need to grant the migrator role to someone else. -{% data reusables.enterprise-migration-tool.grant-migrator-tasks %} +{% data reusables.enterprise-migration-tool.grant-migrator-tasks %} For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#about-the-migrator-role)." {% data reusables.enterprise-migration-tool.confirm-migrator-has-correct-pats %} For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)." ### What organizational structure do we want in {% data variables.product.prodname_dotcom %}? diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md index 6a12c46507..e62a43ca97 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md @@ -21,9 +21,13 @@ To migrate a repository from Bitbucket Server to GitHub, you need sufficient acc Additionally, if you use IP allow lists in the destination organization, you may need to configure the allow lists to allow access by {% data variables.product.prodname_importer_proper_name %}. +## About the migrator role + +{% data reusables.enterprise-migration-tool.about-the-migrator-role %} + ## Required roles for {% data variables.product.company_short %} -For the destination organization on {% data variables.product.prodname_dotcom %}, different roles are required for different tasks. For some tasks, you can grant the migrator role to a user or team. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +For the destination organization on {% data variables.product.prodname_dotcom %}, different roles are required for different tasks. {% data reusables.enterprise-migration-tool.gei-required-roles %} @@ -66,6 +70,31 @@ If your Bitbucket Server instance runs on Linux, you must use an SSH key that me If you receive an error like `cipher name aes256-ctr for openssh key file is not supported` when running a migration, your SSH private key uses an unsupported cipher. For more information about how to generate a compatible private key, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/troubleshooting-your-migration-with-github-enterprise-importer#cipher-name-is-not-supported)." +## Granting the migrator role + +To allow someone other than an organization owner to run a migration or download migration logs, you can grant the migrator role to a user or team. For more information, see "[About the migrator role](#about-the-migrator-role)." + +You can grant the migrator role using either the {% data variables.product.prodname_bbs2gh_cli %} or the GraphQL API. + +- "[Granting the migrator role with the {% data variables.product.prodname_bbs2gh_cli_short %}](#granting-the-migrator-role-with-the-bbs2gh-extension)" +- "[Granting the migrator role with the GraphQL API](#granting-the-migrator-role-with-the-graphql-api)" + +### Granting the migrator role with the {% data variables.product.prodname_bbs2gh_cli_short %} + +To grant the migrator role using the CLI, you must have installed the {% data variables.product.prodname_bbs2gh_cli %}. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud#step-1-install-the-bbs2gh-extension-of-the-github-cli)." + +1. On {% data variables.product.prodname_dotcom_the_website %}, create and record a {% data variables.product.pat_generic %} that meets all the requirements for granting the migrator role. For more information, see "[Creating a {% data variables.product.pat_generic %} for {% data variables.product.prodname_importer_proper_name %}](#creating-a-personal-access-token-for-github-enterprise-importer)." +{% data reusables.enterprise-migration-tool.grant-migrator-role-pat %} +1. Use the `gh bbs2gh grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`. + + ```shell copy + gh bbs2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE + ``` + +### Granting the migrator role with the GraphQL API + +{% data reusables.enterprise-migration-tool.grant-migrator-role-graphql %} + ## Creating a {% data variables.product.pat_generic %} for {% data variables.product.prodname_importer_proper_name %} {% data reusables.enterprise-migration-tool.creating-a-pat-steps %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md index dfec9edc38..2ea725ae0a 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md @@ -21,7 +21,7 @@ At this time, migrating from Bitbucket Server with the {% data variables.product ## Prerequisites {% data reusables.enterprise-migration-tool.migration-prerequisites %} -- For the destination organization on {% data variables.product.prodname_dotcom_the_website %}, you must be an organization owner or have the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +- For the destination organization on {% data variables.product.prodname_dotcom_the_website %}, you must be an organization owner or have the migrator role. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#about-the-migrator-role)." - You need the username and password for a Bitbucket Server account with admin or super admin permissions. ## Step 1: Install the {% data variables.product.prodname_bbs2gh_cli %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/overview-of-a-migration-from-bitbucket-server-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/overview-of-a-migration-from-bitbucket-server-to-github-enterprise-cloud.md index 99ec71de01..9eaef828ce 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/overview-of-a-migration-from-bitbucket-server-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/overview-of-a-migration-from-bitbucket-server-to-github-enterprise-cloud.md @@ -63,7 +63,7 @@ You must also have required permissions and access to your Bitbucket Server inst - If your Bitbucket Server instance runs Windows, file sharing (SMB) access to the instance 1. Decide whether you want an organization owner of the destination organization to perform your migrations, or whether you need to grant the migrator role to someone else. -{% data reusables.enterprise-migration-tool.grant-migrator-tasks %} +{% data reusables.enterprise-migration-tool.grant-migrator-tasks %} For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#about-the-migrator-role)." {% data reusables.enterprise-migration-tool.confirm-migrator-has-correct-pats %} For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#required-scopes-for-personal-access-tokens)." 1. Confirm the migrator has admin or super admin permissions and SFTP access for your Bitbucket Server instance. diff --git a/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer.md b/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer.md deleted file mode 100644 index a613b4e328..0000000000 --- a/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Granting the migrator role for GitHub Enterprise Importer -shortTitle: Grant migrator role -intro: 'To allow someone who isn''t an organization owner to run migrations, you can grant a person or team the migrator role.' -versions: - fpt: '*' - ghes: '*' - ghec: '*' -permissions: Organization owners can grant the migrator role. -defaultTool: cli -redirect_from: - - /early-access/enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer ---- - -## About the migrator role - -To remove the need for organization owners to complete migrations, {% data variables.product.prodname_dotcom_the_website %} includes a distinct role for using {% data variables.product.prodname_importer_proper_name %}. Granting the migrator role allows you to designate other teams or individuals to handle your migrations. - -You can grant the migrator role to an individual user or a team. We strongly recommend that you assign the migrator role to a team. Then, you can further customize who can run a migration by adjusting team membership. For more information about changing team membership, see "[AUTOTITLE](/organizations/organizing-members-into-teams/adding-organization-members-to-a-team)" or "[AUTOTITLE](/organizations/organizing-members-into-teams/removing-organization-members-from-a-team)." - -You can only grant the migrator role for an organization on {% data variables.product.prodname_dotcom_the_website %}. If you're migrating a repository between two organizations on {% data variables.product.prodname_dotcom_the_website %}, you can grant the migrator role to the same person or team for both organizations, but you must grant each separately. - -{% note %} - -**Note:** You cannot grant the migrator role for enterprise accounts. Therefore, you can only run an organization migration if you're an owner of the destination enterprise. However, you can grant the migrator role to that enterprise owner for the source organization. - -{% endnote %} - -After you grant the migrator role, make sure the migrator uses a {% data variables.product.pat_generic %} that meets all the requirements for running migrations. For the details of those requirements, see the appropriate article for your migration path. - -- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)" -- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#required-scopes-for-personal-access-tokens)" -- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)" - -{% cli %} - -{% data reusables.enterprise-migration-tool.gei-tool-switcher-api %} - -## Granting the migrator role with the {% data variables.product.prodname_ado2gh_cli_short %} - -1. On {% data variables.product.prodname_dotcom_the_website %}, create and record a {% data variables.product.pat_generic %} that meets all the requirements for granting the migrator role. For a full list of requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#creating-a-personal-access-token-for-github)." -{% data reusables.enterprise-migration-tool.grant-migrator-role-pat %} -1. Use the `gh ado2gh grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`. - - ```shell copy - gh ado2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE - ``` - -## Granting the migrator role with the {% data variables.product.prodname_bbs2gh_cli_short %} - -1. On {% data variables.product.prodname_dotcom_the_website %}, create and record a {% data variables.product.pat_generic %} that meets all the requirements for granting the migrator role. For a full list of requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#creating-a-personal-access-token-for-github-enterprise-importer)." -{% data reusables.enterprise-migration-tool.grant-migrator-role-pat %} -1. Use the `gh bbs2gh grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`. - - ```shell copy - gh bbs2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE - ``` - -## Granting the migrator role with the {% data variables.product.prodname_gei_cli_short %} - -{% note %} - -**Note:** The {% data variables.product.prodname_cli %} does not support granting the migrator role for organizations on {% data variables.product.prodname_ghe_server %}, so you must be an organization owner of the source organization to migrate repositories from {% data variables.product.prodname_ghe_server %}. - -{% endnote %} - -1. On {% data variables.product.prodname_dotcom_the_website %}, create and record a {% data variables.product.pat_generic %} that meets all the requirements for granting the migrator role. For a full list of requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#creating-a-personal-access-token-for-github-enterprise-importer)." -{% data reusables.enterprise-migration-tool.grant-migrator-role-pat %} -1. Use the `gh gei grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`. - - ```shell copy - gh gei grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE - ``` - -{% endcli %} - -{% api %} - -{% data reusables.enterprise-migration-tool.gei-tool-switcher-cli %} - -## Granting the migrator role with the GraphQL API - -You can use the `grantMigratorRole` GraphQL mutation to assign the migrator role and the `revokeMigratorRole` mutation to revoke the migrator role. - -You must use a {% data variables.product.pat_generic %} (PAT) that meets all access requirements. For more information, see the appropriate article for your migration path. - -- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)" -- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#required-scopes-for-personal-access-tokens)" -- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)" - -### `grantMigratorRole` mutation - -This GraphQL mutation sets the migration role. - -```graphql -mutation grantMigratorRole ( - $organizationId: ID!, - $actor: String!, - $actor_type: ActorType! -) { - grantMigratorRole( input: { - organizationId: $organizationId, - actor: $actor, - actorType: $actor_type - }) - { success } -} -``` - -| Query variable | Description | -|----|----| -| `organizationId` | The `ownerId` (or organization ID) for your organization, from the `GetOrgInfo` query. -| `actor` | The team or username who you want to assign the migration role to. -| `actor_type` | Specify whether the migrator is a `USER` or `TEAM`. - -### `revokeMigratorRole` mutation - -This mutation removes the migrator role. - -```graphql -mutation revokeMigratorRole ( - $organizationId: ID!, - $actor: String!, - $actor_type: ActorType! -) { - revokeMigratorRole( input: { - organizationId: $organizationId, - actor: $actor, - actorType: $actor_type - }) - { success } -} -``` - -{% endapi %} diff --git a/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/index.md b/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/index.md index 8aa149873a..e60ec695c7 100644 --- a/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/index.md +++ b/content/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/index.md @@ -7,7 +7,6 @@ versions: ghes: '*' ghec: '*' children: - - /granting-the-migrator-role-for-github-enterprise-importer - /preparing-to-run-a-migration-with-github-enterprise-importer redirect_from: - /early-access/enterprise-importer/preparing-to-migrate-with-github-enterprise-importer diff --git a/data/reusables/enterprise-migration-tool/about-the-migrator-role.md b/data/reusables/enterprise-migration-tool/about-the-migrator-role.md new file mode 100644 index 0000000000..7822564a1f --- /dev/null +++ b/data/reusables/enterprise-migration-tool/about-the-migrator-role.md @@ -0,0 +1,7 @@ +To remove the need for organization owners to complete migrations, {% data variables.product.prodname_dotcom_the_website %} includes a distinct role for using {% data variables.product.prodname_importer_proper_name %}. Granting the migrator role allows you to designate other teams or individuals to handle your migrations. You can only grant the migrator role for an organization on {% data variables.product.prodname_dotcom_the_website %}. + +You can grant the migrator role to an individual user or a team. We strongly recommend that you assign the migrator role to a team. Then, you can further customize who can run a migration by adjusting team membership. For more information about changing team membership, see "[AUTOTITLE](/organizations/organizing-members-into-teams/adding-organization-members-to-a-team)" or "[AUTOTITLE](/organizations/organizing-members-into-teams/removing-organization-members-from-a-team)." + +To grant the migrator role, see "[Granting the migrator role](#granting-the-migrator-role)." + +After you grant the migrator role, make sure the migrator uses a {% data variables.product.pat_generic %} that meets all the requirements for running migrations. diff --git a/data/reusables/enterprise-migration-tool/grant-migrator-role-graphql.md b/data/reusables/enterprise-migration-tool/grant-migrator-role-graphql.md new file mode 100644 index 0000000000..d2b6a41bdc --- /dev/null +++ b/data/reusables/enterprise-migration-tool/grant-migrator-role-graphql.md @@ -0,0 +1,47 @@ +You can use the `grantMigratorRole` GraphQL mutation to assign the migrator role and the `revokeMigratorRole` mutation to revoke the migrator role. + +You must use a {% data variables.product.pat_generic %} (PAT) that meets all access requirements. For more information, see the "[Required scopes for {% data variables.product.pat_generic %}s](#required-scopes-for-personal-access-tokens)." + +#### `grantMigratorRole` mutation + +This GraphQL mutation sets the migration role. + +```graphql +mutation grantMigratorRole ( + $organizationId: ID!, + $actor: String!, + $actor_type: ActorType! +) { + grantMigratorRole( input: { + organizationId: $organizationId, + actor: $actor, + actorType: $actor_type + }) + { success } +} +``` + +| Query variable | Description | +|----|----| +| `organizationId` | The `ownerId` (or organization ID) for your organization, from the `GetOrgInfo` query. +| `actor` | The team or username who you want to assign the migration role to. +| `actor_type` | Specify whether the migrator is a `USER` or `TEAM`. + +#### `revokeMigratorRole` mutation + +This mutation removes the migrator role. + +```graphql +mutation revokeMigratorRole ( + $organizationId: ID!, + $actor: String!, + $actor_type: ActorType! +) { + revokeMigratorRole( input: { + organizationId: $organizationId, + actor: $actor, + actorType: $actor_type + }) + { success } +} +``` diff --git a/data/reusables/enterprise-migration-tool/grant-migrator-tasks.md b/data/reusables/enterprise-migration-tool/grant-migrator-tasks.md index abf827af85..c0b32e58d8 100644 --- a/data/reusables/enterprise-migration-tool/grant-migrator-tasks.md +++ b/data/reusables/enterprise-migration-tool/grant-migrator-tasks.md @@ -1,2 +1,2 @@ 1. If you chose to grant the migrator role, decide which person or team you'll grant the role to. -1. Grant the migrator role to the person or team. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/granting-the-migrator-role-for-github-enterprise-importer)." +1. Grant the migrator role to the person or team.