gitore

Introduction
A gitweb/cgit-like interface for the modern age. Written in Rust using Axum, gitoxide, Askama and RocksDB.
Includes a dark mode for late night committing.
Table of Contents
Features
-
Efficient Metadata Storage
RocksDB is used to store all metadata about a repository, including commits, branches, and tags. Metadata is reindexed, and the reindex interval is configurable (default: every 5 minutes), resulting in up to 97% faster load times for large repositories. -
On-Demand Loading
Files, trees, and diffs are loaded using gitoxide directly upon request. A small in-memory cache is included for rendered READMEs and diffs, enhancing performance. -
Dark Mode Support
Enjoy a dark mode for late-night committing, providing a visually comfortable experience during extended coding sessions.
Getting Started
Before you begin, ensure that you have the Rust toolchain and Cargo installed. If you haven't installed them yet, you can do so by following the instructions provided on the official Rust website:
Once you have Rust and Cargo installed, you can proceed with setting up and running the project.
Note: This software is designed to work exclusively with bare Git repositories. Make sure to set up bare repositories beforehand by following the Git on the Server documentation.
Usage
To get up and running quickly, run gitore with the following:
gitore -s /path/to/my-bare-repos -d /tmp/gitore-cache.db
Notes:
- Repository indexing is recursive.
- The database is quick to generate, so this can be pointed to temporary storage.
Configuration
Repository Description
To set a repository description, edit the file named description inside the bare git repository. Add your desired description text to this file.
Repository Owner
To assign an owner to a repository, edit the file named config inside the bare git repository and include the following content:
[gitweb]owner = "Al Gorithm"
Replace Al Gorithm with the desired owner's name.
Docker
Running gitore in Docker is straightforward. Follow these steps, ensuring that your repository directory is correctly mounted:
docker run --mount type=bind,source=/path/to/my-bare-repos,target=/git \--user $UID:$GID \-e SCAN_PATH=/git -e DB_STORE=/tmp/repo.db \-it codeberg.org/kallisti5/gitore:latest
Note: Replace $UID and $GID with the UID and GID of the user that owns the directory containing your repositories. If these values are incorrect, errors will occur. Learn how to find the UID of a user here.
Contributing
Pull requests are welcome
License
- gitore is licensed under the MIT.
- gitore is originally based on rgit, released under the WTFPL
- Per the terms of the WTFPL license, gitore was relicensed under the more well known MIT.
Troubleshooting
Cloning Repositories
Repository not exported
Symptom: When attempting to clone repositories via HTTPS, you encounter the error message:
Git returned an error: Repository not exported
Solution:
Create a file named git-daemon-export-ok in the bare git repository. This file signals to the git daemon that the repository is exportable.
Launching the Application
...is not owned by the current user
Symptom: When launching the application, you receive the error message:
repository path '/git/path/to/my/repository.git/' is not owned by the current user
Solution:
Ensure that the user launching gitore or the Docker container has the same permissions as the user that owns the repositories directory.
Application Usage
Newly initialized repositories do not appear
Symptom: When using the application, a newly initialized bare repository without commits does not appear in the list.
Solution: Run the following command inside the repository to initialize it:
git pack-refs --all
Alternatively, push a commit with at least one file to the repository. This will also make the repository appear in the list.