debian-mirror-gitlab/doc/user/project/import/manifest.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
2.9 KiB
Markdown
Raw Normal View History

2020-06-23 00:09:42 +05:30
---
type: howto
stage: Manage
group: Import
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-06-23 00:09:42 +05:30
---
2021-09-04 01:27:46 +05:30
# Import multiple repositories by uploading a manifest file **(FREE)**
2018-11-18 11:00:15 +05:30
2020-06-23 00:09:42 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/28811) in GitLab 11.2.
2018-11-18 11:00:15 +05:30
GitLab allows you to import all the required Git repositories
based on a manifest file like the one used by the
[Android repository](https://android.googlesource.com/platform/manifest/+/2d6f081a3b05d8ef7a2b1b52b0d536b2b74feab4/default.xml).
2022-11-25 23:54:43 +05:30
Use the manifest to import a project with many
2018-11-18 11:00:15 +05:30
repositories like the Android Open Source Project (AOSP).
## Requirements
2023-03-17 16:20:25 +05:30
- GitLab must use PostgreSQL for its database, because [subgroups](../../group/subgroups/index.md) are needed for the manifest import
to work. Read more about the [database requirements](../../../install/requirements.md#database).
- At least the Maintainer role on the destination group to import to. Using the Developer role for this purpose was
[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/387891) in GitLab 15.8 and will be removed in GitLab 16.0.
2018-11-18 11:00:15 +05:30
## Manifest format
A manifest must be an XML file. There must be one `remote` tag with a `review`
attribute that contains a URL to a Git server, and each `project` tag must have
a `name` and `path` attribute. GitLab will then build the URL to the repository
by combining the URL from the `remote` tag with a project name.
2021-06-08 01:23:25 +05:30
A path attribute is used to represent the project path in GitLab.
2018-11-18 11:00:15 +05:30
Below is a valid example of a manifest file:
```xml
<manifest>
2019-02-15 15:39:39 +05:30
<remote review="https://android.googlesource.com/" />
2018-11-18 11:00:15 +05:30
<project path="build/make" name="platform/build" />
<project path="build/blueprint" name="platform/build/blueprint" />
</manifest>
```
2021-06-08 01:23:25 +05:30
As a result, the following projects are created:
2018-11-18 11:00:15 +05:30
2019-02-15 15:39:39 +05:30
| GitLab | Import URL |
|:------------------------------------------------|:------------------------------------------------------------|
| `https://gitlab.com/YOUR_GROUP/build/make` | <https://android.googlesource.com/platform/build> |
| `https://gitlab.com/YOUR_GROUP/build/blueprint` | <https://android.googlesource.com/platform/build/blueprint> |
2018-11-18 11:00:15 +05:30
2021-06-08 01:23:25 +05:30
## Import the repositories
2018-11-18 11:00:15 +05:30
2021-06-08 01:23:25 +05:30
To start the import:
2018-11-18 11:00:15 +05:30
2022-07-23 23:45:48 +05:30
1. From your GitLab dashboard select **New project**.
2021-06-08 01:23:25 +05:30
1. Switch to the **Import project** tab.
2022-07-23 23:45:48 +05:30
1. Select **Manifest file**.
2021-06-08 01:23:25 +05:30
1. Provide GitLab with a manifest XML file.
1. Select a group you want to import to (you need to create a group first if you don't have one).
2022-07-23 23:45:48 +05:30
1. Select **List available repositories**. At this point, you are redirected
2018-11-18 11:00:15 +05:30
to the import status page with projects list based on the manifest file.
2022-07-23 23:45:48 +05:30
1. Check the list and select **Import all repositories** to start the import.
2018-11-18 11:00:15 +05:30
2020-10-24 23:57:45 +05:30
![Manifest status](img/manifest_status_v13_3.png)