👋 We've unified all of GitHub's product documentation in one place! Check out the content for REST API, GraphQL API, and Developers. Learn more on the GitHub blog.
Article version: Enterprise Server 2.21

Completing the import on GitHub Enterprise Server

After your migration is applied to your target instance and you have reviewed the migration, you'll unlock the repositories and delete them off the source. Before deleting your source data we recommend waiting around two weeks to ensure that everything is functioning as expected.

In this article

Were you able to find what you were looking for?

Unlocking repositories on the target instance

  1. SSH into your GitHub Enterprise Server instance.
    $ ssh -p 122 admin@HOSTNAME
  2. Unlock all the imported repositories with the ghe-migrator unlock command. You'll need your Migration GUID:
    $ ghe-migrator unlock -g MIGRATION_GUID
    > Unlocked octo-org/octo-project

Unlocking repositories on the source

Unlocking repositories from a GitHub.com organization

To unlock the repositories on a GitHub.com organization, you'll send a DELETE request to the migration unlock endpoint. You'll need:

  • Your access token for authentication
  • The unique id of the migration
  • The name of the repository to unlock
    curl -H "Authorization: token GITHUB_ACCESS_TOKEN" -X DELETE \
      -H "Accept: application/vnd.github.wyandotte-preview+json" \
      https://api.github.com/orgs/orgname/migrations/id/repos/repo_name/lock

Deleting repositories from a GitHub.com organization

After unlocking the GitHub.com organization's repositories, you should delete every repository you previously migrated using the repository delete endpoint. You'll need your access token for authentication:

curl -H "Authorization: token GITHUB_ACCESS_TOKEN" -X DELETE \
  https://api.github.com/repos/orgname/repo_name

Unlocking repositories from a GitHub Enterprise Server instance

  1. SSH into your GitHub Enterprise Server instance.
    $ ssh -p 122 admin@HOSTNAME
  2. Unlock all the imported repositories with the ghe-migrator unlock command. You'll need your Migration GUID:
    $ ghe-migrator unlock -g MIGRATION_GUID
    > Unlocked octo-org/octo-project

Were you able to find what you were looking for?

Ask a human

Can't find what you're looking for?

Contact us