CLI helpers to manage a set of git repositories.
- Retrieve and backup hosted GIT repositories (github, gitlab, gogs, gitea)
- Compute stats and performs some basic checks (ex : README.md, LICENSE, trivy scan,...)
- View stats and checks :
- PHP >= 8.x
Name | Description | Default |
---|---|---|
GIT_MANAGER_DIR |
Directory containing git repositories | {projectDir}/var/data |
TRIVY_ENABLED |
Enable/disable trivy scan | true |
git clone https://github.com/mborne/git-manager
cd git-manager
composer install
- From github :
bin/console git:fetch-all --orgs IGNF --users=mborne https://github.com $GITHUB_TOKEN
# for private repositories, use "_me_" :
bin/console git:fetch-all --users=_me_ https://github.com $GITHUB_TOKEN
- From gogs or gitea :
bin/console git:fetch-all --type gogs-v1 https://codes.quadtreeworld.net $QTW_TOKEN
bin/console git:stats -O stats.json
# Build image
docker compose build
# Start git-manager on http://localhost:8000
docker compose up -d
# Fetch repositories
docker compose exec git-manager bin/console git:fetch-all https://github.com -u mborne
#docker compose exec git-manager bin/console git:fetch-all --type gogs-v1 https://codes.quadtreeworld.net $QTW_TOKEN
# Build stats
docker compose exec git-manager bin/console git:stats