- Project import history
- LFS authentication
- Migrate from self-managed GitLab to GitLab.com
- Migrate from GitLab.com to self-managed GitLab
- Migrate between two self-managed GitLab instances
- Project aliases
- Automate group and project import
See these documents to migrate to GitLab:
- From Bitbucket Cloud
- From Bitbucket Server (also known as Stash)
- From ClearCase
- From CVS
- From FogBugz
- From GitHub.com or GitHub Enterprise
- From GitLab.com
- From Gitea
- From Perforce
- From SVN
- From TFVC
- From repository by URL
- By uploading a manifest file (AOSP)
- From Phabricator
- From Jira (issues only)
You can also import any Git repository through HTTP from the New Project page. Note that if the repository is too large, the import can timeout.
You can also connect your external repository to get CI/CD benefits.
You can view all project imports created by you. This list includes the following:
- Source (without credentials for security reasons)
- Error details if the import failed
To view project import history:
- Sign in to GitLab.
- On the top bar, select New ().
- Select New project/repository.
- Select Import project.
- Select History.
When importing a project that contains LFS objects, if the project has an
file with a URL host (
lfs.url) different from the repository URL host, LFS files are not downloaded.
If you only need to migrate Git repositories, you can import each project by URL. However, you can’t import issues and merge requests this way. To retain all metadata like issues and merge requests, use the import/export feature to export projects from self-managed GitLab and import those projects into GitLab.com. All GitLab user associations (such as comment author) are changed to the user importing the project. For more information, see the prerequisites and important notes in these sections:
To migrate all data from self-managed to GitLab.com, you can leverage the API. Migrate the assets in this order:
Keep in mind the limitations of the import/export feature.
You must still migrate your Container Registry over a series of Docker pulls and pushes. Re-run any CI pipelines to retrieve any build artifacts.
The process is essentially the same as migrating from self-managed GitLab to GitLab.com. The main difference is that an administrator can create users on the self-managed GitLab instance through the UI or the users API.
To migrate from an existing self-managed GitLab instance to a new self-managed GitLab instance, it’s best to back up the existing instance and restore it on the new instance. For example, this is useful when migrating a self-managed instance from an old server to a new server.
The backups produced don’t depend on the operating system running GitLab. You can therefore use the restore method to switch between different operating system distributions or versions, as long as the same GitLab version is available for installation.
To instead merge two self-managed GitLab instances together, use the instructions in Migrate from self-managed GitLab to GitLab.com. This method is useful when both self-managed instances have existing data that must be preserved.
Also note that administrators can use the Users API to migrate users.
Introduced in GitLab 12.1.
GitLab repositories are usually accessed with a namespace and a project name. When migrating frequently accessed repositories to GitLab, however, you can use project aliases to access those repositories with the original name. Accessing repositories through a project alias reduces the risk associated with migrating such repositories.
This feature is only available on Git over SSH. Also, only GitLab administrators can create project aliases, and they can only do so through the API. For more information, see the Project Aliases API documentation.
After an administrator creates an alias for a project, you can use the alias to clone the
repository. For example, if an administrator creates the alias
gitlab for the project
https://gitlab.com/gitlab-org/gitlab, you can clone the project with
git clone firstname.lastname@example.org:gitlab.git instead of
git clone email@example.com:gitlab-org/gitlab.git.
The GitLab Professional Services team uses Congregate to orchestrate user, group, and project import API calls. With Congregate, you can migrate data to GitLab from:
- Other GitLab instances
- GitHub Enterprise
- Bitbucket Server
- Bitbucket Data Center
See the Quick Start Guide to learn how to use this approach for migrating users, groups, and projects at scale.