Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mborne/git-manager
CLI helpers to manage hosted git repositories.
https://github.com/mborne/git-manager
backup git gitea github gitlab gogs scan stats
Last synced: 21 days ago
JSON representation
CLI helpers to manage hosted git repositories.
- Host: GitHub
- URL: https://github.com/mborne/git-manager
- Owner: mborne
- License: mit
- Created: 2018-11-26T09:17:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T05:44:04.000Z (7 months ago)
- Last Synced: 2024-10-08T15:14:10.734Z (about 1 month ago)
- Topics: backup, git, gitea, github, gitlab, gogs, scan, stats
- Language: PHP
- Homepage:
- Size: 324 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-manager
[![CI](https://github.com/mborne/git-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/mborne/git-manager/actions/workflows/ci.yml)
CLI helpers to manage a set of git repositories.
## Features
* Retrieve and backup hosted GIT repositories (github, gitlab, gogs, gitea)
* Compute stats and performs some basic checks (ex : README.md, LICENSE, [trivy scan](https://aquasecurity.github.io/trivy/),...)
* View stats and checks :![screenshot](docs/screenshot.png)
## Requirements
* PHP >= 8.x
## Parameters
| Name | Description | Default |
| ----------------- | ------------------------------------- | ----------------------- |
| `GIT_MANAGER_DIR` | Directory containing git repositories | `{projectDir}/var/data` |
| `TRIVY_ENABLED` | Enable/disable trivy scan | `true` |## Setup
```bash
git clone https://github.com/mborne/git-manager
cd git-manager
composer install
```## Usage
### Fetch repositories
* From github :
```bash
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 :
```bash
bin/console git:fetch-all --type gogs-v1 https://codes.quadtreeworld.net $QTW_TOKEN
```### Compute stats about repositories
```bash
bin/console git:stats -O stats.json
```## Usage with docker
```bash
# 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
```## License
[MIT](LICENSE)