Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 3 days 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.

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
```