https://github.com/jmhbnz/gitlab-group-fork
Python script to copy an entire namespace (group with projects) into a new namespace by recreating the group structure and forking all projects into the new groups.
https://github.com/jmhbnz/gitlab-group-fork
git gitlab python
Last synced: 2 months ago
JSON representation
Python script to copy an entire namespace (group with projects) into a new namespace by recreating the group structure and forking all projects into the new groups.
- Host: GitHub
- URL: https://github.com/jmhbnz/gitlab-group-fork
- Owner: jmhbnz
- License: mit
- Created: 2021-08-17T20:42:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-17T20:51:48.000Z (almost 5 years ago)
- Last Synced: 2026-02-22T15:48:26.004Z (4 months ago)
- Topics: git, gitlab, python
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitLab Group Fork
Using the GitLab API and the python-gitlab module this will recursively fork projects from one group to another.
Set Environment Variable `GITLAB_TOKEN` to the [personal API token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) from your gitlab servers or optionally use -t on the command-line.
```bash
# Create new python virtual environment
python3 -m venv .test
# Activate the virtual environment
source .test/bin/activate
# Install python dependencies
pip install -r requirements.txt
# Run the script
python3 gitlab_group_fork.py tps tps3 -t -u
```