How to Migrate from GitHub to GitLab

As you may very well know, Gitlab is among the best alternatives to Github, the first that comes to mind, from the available options. Gitlab is a scalable and efficient Git-based fully featured platform for software development: it supports a complete DevOps lifecycle.

Read Also: How to Install and Configure GitLab on CentOS 7

Do you have projects on Github and want to migrate to Gitlab? In this article, we will explain how to migrate from Github to Gitlab and also we will explain how to import your open source project from Github to Gitlab in a few easy steps, using the GitHub integration feature.

Attention: The instructions below work for users on Gitlab.com, for a self-hosted Gitlab instance, you have to manually enable the GitHub integration feature to use this method.

Requirements:

Before going any further, ensure that:

  • Both your Github and Gitlab accounts are created using the same public email account or.
  • You logged into the GitLab account using the GitHub icon, meaning you use the same email address for both accounts.

The above requirements also apply to all other users who are attached to your Github project, that you want to map to Gitlab.

Migrating From Github to Gitlab

1. First go to Gitlab Sign In page and then sign in with the Github icon, or Register with the same email address you used for registering with Github.

GitLab Sign In
GitLab Sign In

2. After successfully signing in, go to the top navigation bar, click on + and choose New project and enter path of your New Project as shown.

GitLab Create New Project
GitLab Create New Project

3. Next, click on the Import project tab and then choose GitHub from the available options as shown in the screenshot.

Select GitHub Repository Source
Select GitHub Repository Source

4. You will be redirected to the repository importation page, click on List your GitHub repositories.

List GitHub Repositories
List GitHub Repositories

5. Then, you should be redirected to an external application authorization page on github.com to authorize the GitLab, as shown in this screenshot. Click Authorize gitlabhq.

Authorize Github to Gitlab Repository
Authorize Github to Gitlab Repository

6. You will be redirected back to Gitlab’s import page where you should see a list of all your GitHub repositories. Click on Import from the status column, for each repository you want to import from Github to Gitlab.

Import Github Repositories to Gitlab
Import Github Repositories to Gitlab

7. Once your repository is imported, its status will change to Done as shown in this screenshot.

Github Repositories Imported to Gitlab
Github Repositories Imported to Gitlab

8. Now from your Gitlab Projects list, the repository you just imported should be there.

Migrated GitHub Proects to GitLab
Migrated GitHub Proects to GitLab

For more information, go to the GitLab Docs page.

That’s all! In this article, we have explained how to migrate from Github to Gitlab. If you have any questions, or thoughts to share, reach us via the feedback form below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.