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.

Unlocking repositories on the target instance

  1. SSH into your GitHub Enterprise 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 instance

  1. SSH into your GitHub Enterprise 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