Migrate from Gitea
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
Import your projects from Gitea to GitLab.
The Gitea importer imports a subset of items from Gitea.
| Gitea item | Imported |
|---|---|
| Repository description | |
| Git repository data | |
| Issues | |
| Pull requests | |
| Milestones | |
| Labels | |
| Diff notes from pull requests |
Importer workflow
The Gitea importer supports post-migration mapping of user contributions for GitLab.com and GitLab Self-Managed. The importer also supports an alternative method of mapping.
When importing:
- Repository public access is retained. If a repository is private in Gitea, it’s created as private in GitLab as well.
- Imported issues, merge requests, and comments have an Imported badge in GitLab.
- Because Gitea is not an OAuth provider, the author or assignee cannot be mapped to users on your GitLab instance. The project creator (usually the user who started the import process) is then set as the author. For issues, you can still see the original Gitea author.
Prerequisites
- Gitea version 1.0.0 or later.
- You must enable the Gitea import source or ask your GitLab administrator to enable it. Enabled by default on GitLab.com.
- At least the Maintainer role on the destination group to import to.
Import your Gitea repositories
During the import, you create a personal access token and perform a one-off authorization with Gitea to grant GitLab access your repositories.
To import your Gitea repositories:
In the upper-right corner, select Create new ( ) and New project/repository.
To start the import authorization process, select Gitea.
Go to
https://your-gitea-instance/user/settings/applications. Replaceyour-gitea-instancewith the host of your Gitea instance.Select Generate New Token.
Enter a token description.
Select Generate Token.
Copy the token hash.
Go back to GitLab and provide the token to the Gitea importer.
Select List your Gitea repositories and wait while GitLab reads your repositories’ information. When complete, GitLab displays the importer page to select the repositories to import. From there, you can view the import statuses of your Gitea repositories:
- Those that are being imported show a started status.
- Those already successfully imported are green with a done status.
- Those that aren’t yet imported have Import on the right side of the table.
- Those that are already imported have Re-import on the right side of the table.
To finish importing Gitea repositories, you can:
- Import all of your Gitea projects at once. In the upper-left corner, select Import all projects.
- Import only selected projects by filtering projects by name. If you apply a filter, Import all projects imports only selected projects.
- Choose a different name for the project and a different namespace if you have the privileges to do so.
Alternative method of mapping
In GitLab 18.5 and earlier, you can disable the gitea_user_mapping feature flag to use the alternative user
contribution mapping method for imports.
The availability of this feature is controlled by a feature flag. This feature is not recommended and is unavailable for:
- Migrations to GitLab.com.
- Migrations to GitLab Self-Managed and GitLab Dedicated 18.6 and later.
Problems that are found in this mapping method are unlikely to be fixed. Use the post-migration method instead that doesn’t have these limitations.
For more information, see issue 512211.
Using this method, user contributions are assigned to the project creator (usually the user who started the import process) by default.