Import your projects from GitHub to GitLab with minimal effort.
Note: If you are an administrator you can enable the GitHub integration in your GitLab instance sitewide. This configuration is optional, users will still be able to import their GitHub repositories with a personal access token.
When issues/pull requests are being imported, the GitHub importer tries to find the GitHub author/assignee in GitLab's database using the GitHub ID. For this to work, the GitHub author/assignee should have signed in beforehand in GitLab and associated their GitHub account. If the user is not found in GitLab's database, the project creator (most of the times the current user that started the import process) is set as the author, but a reference on the issue about the original GitHub author is kept.
The importer will create any new namespaces (groups) if they don't exist or in the case the namespace is taken, the repository will be imported under the user's namespace that started the import process.
The importer page is visible when you create a new project.
Click on the GitHub link and the import authorization process will start. There are two ways to authorize access to your GitHub repositories:
If the GitHub integration is enabled by your GitLab administrator, you can use it instead of the personal access token.
You can now go on and select which repositories to import.
Note: For a proper author/assignee mapping for issues and pull requests, the GitHub integration should be used instead of the personal access token. If the GitHub integration is enabled by your GitLab administrator, it should be the preferred method to import your repositories. Read more in the How it works section.
If you are not using the GitHub integration, you can still perform a one-off authorization with GitHub to grant GitLab access your repositories:
After you've authorized access to your GitHub repositories, you will be redirected to the GitHub importer page.
From there, you can see the import statuses of your GitHub repositories.
If you want, you can import all your GitHub projects in one go by hitting Import all projects in the upper left corner.
You can also choose a different name for the project and a different namespace, if you have the privileges to do so.