# ermite A single-user Git forge in one Go binary. ermite hosts bare repositories, serves clone and push over HTTPS, reviews branches as merge requests, and shows everything in a web interface with live updates. Status: early development. `ermite serve` serves Git over HTTP (clone, fetch, push), the API, `GET /-/health`, and the web: repositories, tree, files, commits, refs and merge requests. Visitors read public repositories; the owner signs in with a one-time link from the CLI to see private ones and to review and merge. ## Run ```sh export ERMITE_DATA_DIR=/var/lib/ermite export ERMITE_PUBLIC_URL=https://git.example.com export ERMITE_ADMIN_TOKEN=$(head -c 32 /dev/urandom | base64) ermite serve ``` | Variable | Default | Notes | |---|---|---| | `ERMITE_DATA_DIR` | required | absolute path of the data root | | `ERMITE_PUBLIC_URL` | required | `http(s)` base URL, no path | | `ERMITE_ADMIN_TOKEN` | required | at least 32 characters | | `ERMITE_ADDR` | `:7341` | listen address | | `ERMITE_TRUSTED_PROXIES` | empty | comma-separated CIDRs | | `ERMITE_GIT` | `git` | git 2.45 or newer | | `ERMITE_GIT_READER` | `ermite-git` | `ermite-git` reads refs, trees, blobs and history with the [ermite-git](https://git.bnema.dev/bnema/ermite-git) library where it is faster than the `git` binary and falls back to `git` elsewhere and for repositories it does not read; `cli` uses the `git` binary for every read (the escape hatch if a read looks wrong: set it and restart) | | `ERMITE_SOURCE_URL` | `$ERMITE_PUBLIC_URL/ermite` | link to the source (AGPL) | | `ERMITE_LOG_LEVEL` | `info` | `trace`, `debug`, `info`, `warn`, `error` | | `ERMITE_LOG_FORMAT` | `json` | `json` or `console` | | `ERMITE_COMMITTER_NAME` | `ermite` | committer of squash merges | | `ERMITE_COMMITTER_EMAIL` | `ermite@` | committer email of squash merges | `ermite version` prints the version (and the server's when `ERMITE_URL` is set). ## Remote CLI The same binary drives a running server over its API. It reads `ERMITE_URL` (the server address, `http://` or `https://`) and `ERMITE_TOKEN` (a bearer token; optional for public reads). A token sent over plain `http://` to a host that is not loopback triggers a warning on every call. ```sh export ERMITE_URL=https://git.example.com ERMITE_TOKEN=ermite_... ermite repo list | show | create [--description …] [--visibility public] | edit [--description …] [--visibility …] [--default-branch …] | delete [--yes] ermite token create