Clone all GitLab group projects (Protected Version)
Project description
Git Clone Group (gcg)
A command-line tool to clone or update all projects from a GitLab group and its subgroups.
Features
- Clone/update all repositories in a GitLab group and its subgroups
- Support both group ID and group name/path
- Specify branch to clone/pull
- Parallel processing with progress bars
- Smart retry mechanism
- Empty repository detection
- Detailed statistics
Installation
You can install git-clone-group using pip:
pip install git-clone-group
Usage
Basic usage:
# By group ID
gcg -g GITLAB_ADDR -t TOKEN -i GROUP_ID [-d DEST_DIR] [-b BRANCH] [-y]
# By group name/path
gcg -g GITLAB_ADDR -t TOKEN -n GROUP_NAME [-d DEST_DIR] [-b BRANCH] [-y]
# No group specified: list all accessible groups, summarize repo counts, and prompt to proceed
gcg -g GITLAB_ADDR -t TOKEN [-d DEST_DIR] [-b BRANCH] [-y]
Show help:
gcg -h
Examples:
# Clone all projects from group ID 123 to current directory
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx -i 123
# Clone/update all projects from group named 'my-team'
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx -n my-team
# Clone from nested group using full path
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx -n organization/my-team
# Clone to a specific directory
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx -n my-team -d /path/to/repos
# Clone specific branch from private GitLab instance
gcg -g git.company.com -t glpat-xxxxxxxxxxxx -n my-team -d ./projects -b develop
# Clone default branches using group ID
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx -i 123 -d ./repos
# Pull ALL accessible groups (will list a summary and ask for confirmation)
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx
# Non-interactive: skip confirmation when running all groups
gcg -g gitlab.com -t glpat-xxxxxxxxxxxx -y
Getting a GitLab Access Token
- Log in to your GitLab instance
- Go to Settings > Access Tokens
- Create a new personal access token with
apiscope - Copy the token and use it with the
--tokenargument
Getting a Group ID or Name
Group ID
You can find the group ID in GitLab:
- Go to your group's page
- The group ID is shown in the group information panel
- Or look at the URL:
https://gitlab.com/groups/your-group-name- the group ID will be visible in the group details
Group Name/Path
You can use the group name or full path:
- Simple group name:
my-team - Full group path:
organization/my-team - If multiple groups match the search, you'll be prompted to choose
Notes
- The tool will automatically handle nested subgroups
- For existing repositories, it will perform a git pull
- Progress bars show real-time cloning/pulling status
- Both HTTP and SSH URLs are supported (SSH recommended)
- When using group names, if multiple matches are found, you'll be prompted to select the correct one
- If no group is specified, the tool will list all groups accessible by your token with the counts of groups and projects, then prompt you to proceed. Use
-y/--yesto skip confirmation in non-interactive environments.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_clone_group-1.2.2.tar.gz.
File metadata
- Download URL: git_clone_group-1.2.2.tar.gz
- Upload date:
- Size: 83.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ec92992da73376d0bd305636fb91a8e11c2cce37c372d38848a32dee0b1260b
|
|
| MD5 |
d394e51a9579671a8793bb8d481c024f
|
|
| BLAKE2b-256 |
d0642ba7b2751e6a6549f803298186e9021beb5bfd4b7150847c596deb947bf2
|
File details
Details for the file git_clone_group-1.2.2-py3-none-any.whl.
File metadata
- Download URL: git_clone_group-1.2.2-py3-none-any.whl
- Upload date:
- Size: 86.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7179d446997f6b143ce56d3ff3bb0be336305edb4c160f52505d95a780ca0779
|
|
| MD5 |
cbb53db97c4c2e4b9f03ed77c03568fe
|
|
| BLAKE2b-256 |
7b13240e0fcb4b066f5d476ad53e2b305c7234b5af68fe9b21a9814d6efeff29
|