2020-06-08 18:08:27 +00:00
---
stage: Manage
group: Import
2020-11-26 06:09:20 +00:00
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-08 18:08:27 +00:00
---
2021-06-01 21:10:06 +00:00
# Import your project from Gitea to GitLab **(FREE)**
2017-08-16 11:05:13 +00:00
Import your projects from Gitea to GitLab with minimal effort.
2020-12-04 21:09:29 +00:00
NOTE:
2021-09-29 21:12:32 +00:00
This requires Gitea `v1.0.0` or later.
2017-08-16 11:05:13 +00:00
2021-05-10 00:10:37 +00:00
The Gitea importer can import:
2021-09-29 21:12:32 +00:00
- Repository description
- Git repository data
- Issues
- Pull requests
- Milestones
- Labels
2021-05-10 00:10:37 +00:00
2021-05-10 18:10:41 +00:00
When importing, repository public access is retained. If a repository is private in Gitea, it's
created as private in GitLab as well.
2017-08-16 11:05:13 +00:00
## How it works
2021-09-29 21:12:32 +00:00
Because Gitea isn't an OAuth provider, author/assignee can't be mapped to users
in your GitLab instance. This means the project creator (usually the user that
started the import process) is set as the author. A reference, however, is kept
on the issue about the original Gitea author.
2017-08-16 11:05:13 +00:00
2021-09-29 21:12:32 +00:00
The importer creates any new namespaces (groups) if they don't exist. If the
namespace is taken, the repository is imported under the user's namespace
that started the import process.
2017-08-16 11:05:13 +00:00
2021-05-10 00:10:37 +00:00
## Import your Gitea repositories
2017-08-16 11:05:13 +00:00
The importer page is visible when you create a new project.
2021-09-29 21:12:32 +00:00
Select the **Gitea** link to start the import authorization process.
2017-08-16 11:05:13 +00:00
![New Gitea project import ](img/import_projects_from_gitea_new_import.png )
### Authorize access to your repositories using a personal access token
2021-04-26 00:09:41 +00:00
With this method, you perform a one-off authorization with Gitea to grant
2017-08-16 11:05:13 +00:00
GitLab access your repositories:
2019-10-08 03:05:52 +00:00
1. Go to `https://your-gitea-instance/user/settings/applications` (replace
`your-gitea-instance` with the host of your Gitea instance).
2021-09-29 21:12:32 +00:00
1. Select **Generate New Token** .
2017-08-16 11:05:13 +00:00
1. Enter a token description.
2021-09-29 21:12:32 +00:00
1. Select **Generate Token** .
2017-08-16 11:05:13 +00:00
1. Copy the token hash.
1. Go back to GitLab and provide the token to the Gitea importer.
2021-09-29 21:12:32 +00:00
1. Select **List Your Gitea Repositories** and wait while GitLab reads
your repositories' information. After it's done, GitLab displays the importer
2017-08-16 11:05:13 +00:00
page to select the repositories to import.
### Select which repositories to import
2021-04-26 00:09:41 +00:00
After you've authorized access to your Gitea repositories, you are
2017-08-16 11:05:13 +00:00
redirected to the Gitea importer page.
2021-09-29 21:12:32 +00:00
From there, you can view the import statuses of your Gitea repositories:
2017-08-16 11:05:13 +00:00
2021-09-29 21:12:32 +00:00
- 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 an **Import** button on the
2017-08-16 11:05:13 +00:00
right side of the table.
2019-09-18 15:06:03 +00:00
You also can:
2017-08-16 11:05:13 +00:00
2021-09-29 21:12:32 +00:00
- Import all of your Gitea projects in one go by selecting **Import all projects**
in the upper left corner.
- Filter projects by name. If filter is applied, selecting **Import all projects**
imports only matched projects.
2019-09-18 15:06:03 +00:00
![Gitea importer page ](img/import_projects_from_gitea_importer_v12_3.png )
2017-08-16 11:05:13 +00:00
You can also choose a different name for the project and a different namespace,
if you have the privileges to do so.