https://github.com/bdhmiloo/download-gitlab-repos
A shell script to automate cloning all repositories from a specified GitLab group, with support for exclusions and color-coded output. Ideal for onboarding, backups, or mass updates.
https://github.com/bdhmiloo/download-gitlab-repos
bash gitlab utility
Last synced: 2 months ago
JSON representation
A shell script to automate cloning all repositories from a specified GitLab group, with support for exclusions and color-coded output. Ideal for onboarding, backups, or mass updates.
- Host: GitHub
- URL: https://github.com/bdhmiloo/download-gitlab-repos
- Owner: bdhmiloo
- License: mit
- Created: 2025-10-08T07:44:43.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-08T08:00:27.000Z (9 months ago)
- Last Synced: 2025-10-08T09:26:31.680Z (9 months ago)
- Topics: bash, gitlab, utility
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitLab Repository Downloader
A shell script to bulk clone repositories from a GitLab group, with support for exclusions and color-coded output.
## Prerequisites
- Git
- curl
- jq
- Bash (recommended)
- GitLab access token
## Environment Variables
Set the following environment variables before running the script:
```bash
export GITLAB_TOKEN="your-gitlab-token"
export GITLAB_BASE_URL="https://sgts.gitlab-dedicated.com/api/v4"
export GITLAB_BASE_GIT_URL="git@sgts.gitlab-dedicated.com:"
export GITLAB_GROUP_ID="your-group-id"
```
## Usage
```bash
./download-repos.sh [clone_location]
```
- If no `clone_location` is provided, the current directory will be used.
- Run `./download-repos.sh help` for usage instructions.
### Creating an Alias
Add this to your `~/.bashrc` or `~/.zshrc`:
```bash
alias util-download-repos="~/Developer/scripts/download-repos/download-repos.sh"
```
## Excluding Repositories
Create a `.exclude-list` file in the same directory as the script to specify repositories to skip:
```text
# One repository per line
your-grou-id/repo-to-skip
your-grou-id/another-repo-to-skip
```
Lines starting with `#` or empty lines are ignored.
## Features
- Parallel repository cloning
- Repository exclusion support via `.exclude-list`
- Color-coded output for status and errors
- Environment variable configuration
## Troubleshooting
- If you see `Warning: Exclude list file '.exclude-list' not found`, create the file in the script directory.
- If you see an error about missing environment variables, ensure all required variables are exported.
- The script expects to be run with Bash and may not work with other shells.
## License
MIT License