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. As a site admin, 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
    • Your access token for authentication.
      ghe-migrator unlock -g MIGRATION_GUID -u username -p TOKEN
      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. As a site admin, sign in to your GitHub Enterprise instance at http(s)://[hostname]/login.

  2. In the upper-right corner of any page, click . Rocketship icon for accessing site admin settings

  3. In the search field, type the name of the repository and click Search. Site admin settings search field

  4. In the search results, click the name of the repository. Site admin settings search options

  5. Click Unlock. Unlock repository button

  6. Repeat this procedure for any other repositories you exported.