Migrate GitLab projects from a GitLab group to another GitLab's group
Project description
gitlab-projects-migrate
Migrate GitLab projects from a GitLab group to another GitLab's group
Purpose
The migration can be performed between entirely different GitLab servers.
The following steps are required before using the tool:
- The groups need to be created manually by the user or by a GitLab administrator
- The GitLab user tokens must be created with an
api
scope (a short expiration date is recommended)
Examples
# Show the helper menu
gitlab-projects-migrate
# Migrate projects from one group to another, then migrate subgroups
gitlab-projects-migrate 'https://gitlab.com' 'old/group' 'https://gitlab.com' 'new/group'
gitlab-projects-migrate 'https://gitlab.com' 'old/group/subgroup1' 'https://gitlab.com' 'new/group/subgroup1'
gitlab-projects-migrate 'https://gitlab.com' 'old/group/subgroup2' 'https://gitlab.com' 'new/group/subgroup2'
# Migrate projects from one GitLab to another GitLab
gitlab-projects-migrate 'https://old.gitlab.com' 'group/subgroup' 'https://new.gitlab.com'
Usage
usage: gitlab-projects-migrate [-h] [--version] [-I INPUT_TOKEN] [-O OUTPUT_TOKEN] [--keep-members] [--overwrite]
[--set-avatar FILE] [--update-description]
[input_gitlab] [input_group] [output_gitlab] [output_group]
gitlab-projects-migrate: Synchronize projects from a GitLab group to another GitLab group
internal arguments:
-h, --help # Show this help message
--version # Show the current version
migration arguments:
-I INPUT_TOKEN # Input GitLab API token (default: GITLAB_INPUT_TOKEN environment)
-O OUTPUT_TOKEN # Output GitLab API token (default: GITLAB_OUTPUT_TOKEN environment or input_token)
--keep-members # Keep input members after importing on output GitLab
--overwrite # Overwrite existing projects on output GitLab
--set-avatar FILE # Set imported projects' avatar to a specific image file
--update-description # Update project description automatically inside output group
positional arguments:
input_gitlab # Input GitLab URL (default: https://gitlab.com)
input_group # Input GitLab group
output_gitlab # Output GitLab URL (default: https://gitlab.com)
output_group # Output GitLab group (default: input_group)
Dependencies
- colored: Terminal colors and styles
- python-gitlab: A python wrapper for the GitLab API
- setuptools: Build and manage Python packages
References
- git-chglog: CHANGELOG generator
- gitlab-release: Utility for publishing on GitLab
- gitlabci-local: Launch .gitlab-ci.yml jobs locally
- mypy: Optional static typing for Python
- PyPI: The Python Package Index
- twine: Utility for publishing on PyPI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gitlab_projects_migrate-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b35097ee446160350cbc8a104fbf77bea14c051fe82d142a41338321f26d3be9 |
|
MD5 | 56ebab0a2e4d1d64e8235a27bcccb9af |
|
BLAKE2b-256 | ed9ac4237081d60f27fda2a2e6990e751dd265eb9b43d0c0c26c22839e7750c9 |
Close
Hashes for gitlab_projects_migrate-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c5c8872e287e1cccff06b7b4e99b5c79f8eca8c7d6b5439f48c3ac0fc81631c |
|
MD5 | 2eb706676be0865ddfbc93c81c953009 |
|
BLAKE2b-256 | 05284d1845c03e0a3e3591170f739b4fe3ab25b61fef22979cb1a6cad4966a5b |