clone all group projects from gitlab
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]
# By group name/path
gcg -g GITLAB_ADDR -t TOKEN -n GROUP_NAME [-d DEST_DIR] [-b BRANCH]
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 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
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
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
git_clone_group-1.1.3.tar.gz
(26.8 kB
view details)
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.1.3.tar.gz.
File metadata
- Download URL: git_clone_group-1.1.3.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b8d1398b147db1102cc37f75b9be0ef8e4e86fdf3c8f06232a9189840afd8f6
|
|
| MD5 |
6808e7db2b589519337c767fbb25f4ef
|
|
| BLAKE2b-256 |
2fccdf6802af7a8fb780d233198fccf499d6daca26cbcf7ee8df3f00be071a87
|
File details
Details for the file git_clone_group-1.1.3-py3-none-any.whl.
File metadata
- Download URL: git_clone_group-1.1.3-py3-none-any.whl
- Upload date:
- Size: 25.6 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 |
f10e74bfa35e207ab47b0f3ef1d748079e6e2afde8cf95ea6c9332a086d22ee6
|
|
| MD5 |
63d9adfd84d044f45abd46ca6397769c
|
|
| BLAKE2b-256 |
b27c78813ffcb5bfed3d3164e7e4ebd4d076cc328b541a7cb6f889e54b437f64
|