2020-06-23 00:09:42 +05:30
---
type: reference, howto
stage: Manage
group: Import
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-23 00:09:42 +05:30
---
2018-03-17 18:26:18 +05:30
# Import your project from Gitea to GitLab
Import your projects from Gitea to GitLab with minimal effort.
2021-02-22 17:27:13 +05:30
NOTE:
2018-03-17 18:26:18 +05:30
This requires Gitea `v1.0.0` or newer.
2021-06-08 01:23:25 +05:30
The Gitea importer can import:
- Repository description (GitLab 8.15+)
- Git repository data (GitLab 8.15+)
- Issues (GitLab 8.15+)
- Pull requests (GitLab 8.15+)
- Milestones (GitLab 8.15+)
- Labels (GitLab 8.15+)
When importing, repository public access is retained. If a repository is private in Gitea, it's
created as private in GitLab as well.
2018-03-17 18:26:18 +05:30
## How it works
Since Gitea is currently not an OAuth provider, author/assignee cannot be mapped
2021-02-22 17:27:13 +05:30
to users in your GitLab instance. This means that the project creator (most of
2018-03-17 18:26:18 +05:30
the times the current user that started the import process) is set as the author,
but a reference on the issue about the original Gitea author is kept.
2021-06-08 01:23:25 +05:30
The importer creates any new namespaces (groups) if they don't exist or in
the case the namespace is taken, the repository is imported under the user's
2018-03-17 18:26:18 +05:30
namespace that started the import process.
2021-06-08 01:23:25 +05:30
## Import your Gitea repositories
2018-03-17 18:26:18 +05:30
The importer page is visible when you create a new project.
![New project page on GitLab ](img/import_projects_from_new_project_page.png )
2021-06-08 01:23:25 +05:30
Click the **Gitea** link and the import authorization process starts.
2018-03-17 18:26:18 +05:30
![New Gitea project import ](img/import_projects_from_gitea_new_import.png )
### Authorize access to your repositories using a personal access token
2021-06-08 01:23:25 +05:30
With this method, you perform a one-off authorization with Gitea to grant
2018-03-17 18:26:18 +05:30
GitLab access your repositories:
2019-12-21 20:55:43 +05:30
1. Go to `https://your-gitea-instance/user/settings/applications` (replace
`your-gitea-instance` with the host of your Gitea instance).
2018-03-17 18:26:18 +05:30
1. Click **Generate New Token** .
1. Enter a token description.
1. Click **Generate Token** .
1. Copy the token hash.
1. Go back to GitLab and provide the token to the Gitea importer.
1. Hit the **List Your Gitea Repositories** button and wait while GitLab reads
2021-06-08 01:23:25 +05:30
your repositories' information. Once done, you are taken to the importer
2018-03-17 18:26:18 +05:30
page to select the repositories to import.
### Select which repositories to import
2021-06-08 01:23:25 +05:30
After you've authorized access to your Gitea repositories, you are
2018-03-17 18:26:18 +05:30
redirected to the Gitea importer page.
From there, you can see the import statuses of your Gitea repositories.
2021-06-08 01:23:25 +05:30
- Those that are being imported show a _started_ status,
- those already successfully imported are green with a _done_ status,
- whereas those that are not yet imported have an **Import** button on the
2018-03-17 18:26:18 +05:30
right side of the table.
2019-12-21 20:55:43 +05:30
You also can:
2018-03-17 18:26:18 +05:30
2019-12-21 20:55:43 +05:30
- Import all your Gitea projects in one go by hitting **Import all projects** in
2021-06-08 01:23:25 +05:30
the upper left corner.
2019-12-21 20:55:43 +05:30
- Filter projects by name. If filter is applied, hitting **Import all projects**
2021-06-08 01:23:25 +05:30
only imports matched projects.
2019-12-21 20:55:43 +05:30
![Gitea importer page ](img/import_projects_from_gitea_importer_v12_3.png )
2018-03-17 18:26:18 +05:30
You can also choose a different name for the project and a different namespace,
if you have the privileges to do so.