Skip to main content

Command Palette

Search for a command to run...

How to Transfer a Repository from GitLab to GitHub

Simple Instructions for Transferring a Repository from GitLab to GitHub

Published
2 min read
How to Transfer a Repository from GitLab to GitHub
A

A DevOps practitioner dedicated to sharing practical knowledge. Expect in-depth tutorials and clear explanations of DevOps concepts, from fundamentals to advanced techniques. Join me on this journey of continuous learning and improvement!

Import directly using GitHub (No command line)

GitHub also allows Import from GitLab:

  1. Go to GitHub → New Repository

  2. Click "Import a repository"

  3. Enter your GitLab repo URL

  4. Provide GitLab credentials if needed

  5. GitHub automatically copies everything.

Where to Find / Create Your GitLab Personal Access Token

According to GitLab’s official documentation, you can create a personal access token by following these steps:

1. Open Your GitLab User Menu

  • In the upper‑right corner of GitLab, click your avatar
    → Click Edit profile

2. Go to Personal Access Tokens

  • On the left sidebar, select Personal access tokens

(Note: Some GitLab versions show this as Access Tokens under User Settings.)

3. Create a New Token

  • Click Add new token

  • Enter:

    • Token name

    • Expiration date (GitLab defaults to 365 days)

    • Scopes — for GitHub import, choose at least:

      • read_repository

      • api (recommended if anything else is needed)

  • Click Create personal access token

4. Copy the Token Immediately

GitLab shows the token only once.
If you lose it, you must generate a new one.

check the below image for more details

Conclusion: This article provides a guide on how to import a repository from GitLab to GitHub without using the command line. It outlines steps to locate and create a GitLab personal access token required for the import process. Key instructions include accessing your GitLab user menu, navigating to personal access tokens, creating a new token with necessary scopes, and ensuring the token is copied immediately as it will not be shown again.