gitrs
A fast, minimal web interface for self-hosted Git repositories, inspired by cgit and written in Rust using Actix Web, gix (gitoxide), and Askama templates.
Features
- Browse repositories, branches, tags, commit logs, and file trees
- Unified diffs with diffstat bars and raw
.patchexport (git amcompatible) - Download
.tar.gzsnapshots of any branch, tag, or commit - Read-only HTTP smart protocol support (
git clone/git pull) - Automatic filesystem watcher (
notify) that picks up new or removed repositories in/srv/gitwithout restarting the server - Markdown rendering for repository
READMEfiles - Static assets and templates compiled directly into a single binary
More screenshots are available in docs/screenshots/.
Usage
By default, gitrs reads bare repositories from /srv/git and listens on 127.0.0.1:80:
gitrs --url 0.0.0.0 --port 80 --repos-dir /srv/git
Options
| Flag | Default | Description |
|---|---|---|
-u, --url <URL> | 127.0.0.1 | Bind address |
-p, --port <PORT> | 80 | Port to listen on |
-r, --repos-dir <DIR> | /srv/git | Directory containing bare Git repositories |
Repository Metadata
For each bare repository in /srv/git/<repo>:
- Description: Write a plain-text description to
/srv/git/<repo>/description - Owner: Set
gitweb.ownerin the repository config:git -C /srv/git/<repo> config gitweb.owner "your-name"
Installation
Install from crates.io or directly from the repository:
# From crates.io
cargo install gitrs
# Or from a local checkout
cargo install --path .
To install and start the systemd service:
sudo $(which gitrs) --install-service --url 0.0.0.0 --port 80 --repos-dir /srv/git
sudo systemctl daemon-reload
sudo systemctl enable --now gitrs
License
Licensed under the GPL-3.0 license.
