Import multiple repositories by uploading a manifest file
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
GitLab allows you to import all the required Git repositories based on a manifest file like the one used by the Android repository. Use the manifest to import a project with many repositories like the Android Open Source Project (AOSP).
Prerequisites
- Manifest import source must be enabled. If not enabled, ask your GitLab administrator to enable it. The Manifest import source is enabled by default on GitLab.com.
- GitLab must use PostgreSQL for its database, because subgroups are needed for the manifest import to work. Read more about the database requirements.
- At least the Maintainer role on the destination group to import to.
Manifest format
A manifest must be an XML file up to 1 MB in size. 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 then builds the URL to the repository
by combining the URL from the remote
tag with a project name.
A path attribute is used to represent the project path in GitLab.
Below is a valid example of a manifest file:
<manifest>
<remote review="https://android.googlesource.com/" />
<project path="build/make" name="platform/build" />
<project path="build/blueprint" name="platform/build/blueprint" />
</manifest>
As a result, the following projects are created:
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 |
Import the repositories
To start the import:
- From your GitLab dashboard select New project.
- Switch to the Import project tab.
- Select Manifest file.
- Provide GitLab with a manifest XML file.
- Select a group you want to import to (you need to create a group first if you don’t have one).
- Select List available repositories. At this point, you are redirected to the import status page with projects list based on the manifest file.
- To import:
- All projects for the first time: Select Import all repositories.
- Individual projects again: Select Re-import. Specify a new name and select Re-import again. Re-importing creates a new copy of the source project.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support