This site requires JavaScript to be enabled

Migrating from GitLab to GitHub - Decommissioning your GitLab project

351 views

Article Intended For

Penn State faculty, staff, and students who are currently using the Penn State GitLab instance have migrated their repositories and projects to Penn State's GitHub Service and no longer need their code in GitLab.

Introduction

Now that you've completed your migration from GitLab to GitHub, it's essential to ensure that any remaining GitLab resources are properly decommissioned. This not only helps maintain security and organization but also ensures that all necessary resources are consuming space and running correctly. This guide outlines the steps you should take to safely decommission your GitLab projects, CI/CD pipelines, runners, and user accounts.

In this article, we will learn how to:

Danger Zone

Please make sure your projects and configurations have been backed up or transferred to GitHub before following this article. Deleting a project will delete its repository and all related resources, including issues and merge requests.

Deleted assets in GitLab cannot be restored!

Backup and export your project

You can export your GitLab project to your computer as a project maintainer.  Follow these GitLab documentation on how to export a project.

You can also export members as a CSV by following this GitLab documentation

Archive your projects

When you archive a project, some features become read-only. These features are still accessible but not writable.  Follow this GitLab Documentation on how to archive a project.

Pro Tip: Update your project README.md with text directing people to your new repository on GitHub.

Remove secrets and revoke tokens

Remember to remove secrets from your CI/CD pipelines.  To do this:

To add a group variable:

  1. On the left sidebar, select Search or go to and find your group.
  2. Select Settings > CI/CD.
  3. Expand Variables.
  4. Select the variable you wish to remove and click the delete button.

Pro Tip: revoke any credentials in your account. This way, something unexpected cannot access your GitLab projects after you have migrated. Follow this GitLab documentation on revoking personal access tokens and this on revoking a deploy token.

Turn off GitLab CI/CD pipelines and remove runners

You should shut down any pipelines and remove any runners so they do not run any longer.

To turn off GitLab CI/CD Pipelines in your project:

  1. Navigate to Settings > General > Visibility, project features, permissions.
  2. Expand the Repository section
  3. Turn off the Pipelines toggle as required.
  4. Press Save changes for the settings to take effect.

To delete your runners, follow this GitLab documentation on deleting instance runners for a project.

Delete or transfer your projects and repositories

If you are no longer managing a project or repository, you can transfer the ownership to another person by following this GitLab Documentation on changing ownership.

Restrict access permission

Lastly, you should revoke your team's permission to access a repository or turn it read-only.  This way, your team can't accidentally apply a change to an inactive repository.  Follow this GitLab documentation on restricting Git access to your project.

Additional Information

Migrating from GitLab to GitHub - Getting Started

Migrating from GitLab to GitHub - Frequently Asked Questions

Migrating Git Repositories to Penn State's GitHub Service

Signing up for Penn State's GitHub Service