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]
[--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
--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
- 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.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d9e69d17d9cb87741219748aea4f5580b8dab5fa831cfb7426436c3785702e0 |
|
MD5 | 5d11b1d51c9d2c785a95d23d9215ff35 |
|
BLAKE2b-256 | fd9747c6f912003c2850006d47dbfc315c51196abddd79bc50ac3ad62277342d |
Close
Hashes for gitlab_projects_migrate-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe2b3eec5427786dbd8042556930daa99f3f37bdfb86e6423c354affa9624d4c |
|
MD5 | cdd370b000433612395ef31588f27442 |
|
BLAKE2b-256 | 7382cb5d913d4107298d40e899aa4b2fa4fb170645a3c240434f271f807ec713 |