vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Serve the front door from vole serve
c5f2c5d49be1d35a0a54fd70029ac9311647194e · Keenan Nemetz · 16d ago · parent e075258f
Serve the front door from vole serve The forced command had nothing to talk to. This gives `vole serve` the local listener, the token it consumes, and the host key a lease now carries. `ssh_listen` decides what serves SSH and is the only switch: "tcp" is the built-in listener on `ssh_addr` (the default, and unchanged), "socket" is the system sshd in front, "none" serves nothing. The socket path stays in `ssh_socket`, which #304 already added, so no value lives in two places. In socket mode `ssh_addr` only names the host and port clone URLs carry, which validation now enforces by refusing another port: the point of the mode is a clone URL with no port, and a leftover 2222 would silently break every link. The local listener speaks the framed protocol from `internal/sshwire` and turns it back into the Session the built-in listener produces, so `handleLocal` calls the same `exec` with the account and key from the token row and the same ACL, credential-scoping, and refusal code runs. A test proves it: every kind of handler — whoami, roster, both git pack services, the admin API, the run queue, release channels, a refused verb, and a job credential that may do less than its account — is driven over both transports and compared byte for byte, status included. A front-door instance has no signer, so `New` no longer creates a private host key it would never present: it reads sshd's public key from `ssh_public_host_key_file` into the same field a lease carries. A missing or unreadable file fails startup rather than handing a job a key that cannot verify its host, and `Serve` refuses outright when there is no host key. The transport's own details: a write larger than a frame is split rather than refused, stdout and stderr share one socket under one lock, expired tokens are swept every thirty seconds and once at startup so a mode switch leaves nothing behind, and the socket is created 0660 with a stale file replaced only after checking that nothing answers on it. `ssh_user` replaces the hardcoded `git` in generated clone URLs, which is what lets a host with another forge's `git` account keep both. Packaging and the sshd drop-in are #306; the documentation and migration are #307.
docs/reference/configuration.md +5−2
| @@ -12,11 +12,14 @@ below. For common setups and configuration discovery, see | |||
| 12 | 12 | | `secrets_key` | `<data_dir>/secrets.key` | Key that seals repository secrets; store backups apart from the database | | |
| 13 | 13 | | `http_addr` | `"127.0.0.1:8080"` | Web and anonymous Git listener; with `https_addr`, ACME challenges and HTTPS redirects | | |
| 14 | 14 | | `https_addr` | empty | Automatic HTTPS listener; setting it enables ACME | | |
| 15 | | `ssh_addr` | `"127.0.0.1:2222"` | Authenticated Git and remote-administration listener | | ||
| 15 | | `ssh_addr` | `"127.0.0.1:2222"` | SSH listener in `tcp` mode, and the host and port clone URLs carry | | ||
| 16 | | `ssh_listen` | `"tcp"` | How SSH is served: `"tcp"` by this process, `"socket"` through the system sshd, `"none"` | | ||
| 17 | | `ssh_user` | `"git"` | Account in clone URLs; with `ssh_listen = "socket"`, the account sshd runs the forced command as | | ||
| 18 | | `ssh_public_host_key_file` | empty | sshd's public host key, which a CI job verifies when sshd is the front door | | ||
| 16 | 19 | | `ssh_max_connections` | `64` | Simultaneous SSH connections; excess connections close before handshake | | |
| 17 | 20 | | `ssh_max_git_processes` | `16` | Git processes across all SSH connections | | |
| 18 | 21 | | `ssh_handshake_timeout_seconds` | `20` | Maximum time for an SSH handshake | | |
| 19 | | `ssh_socket` | `"/run/vole/ssh.sock"` | Where `vole ssh-exec` reaches `vole serve` when sshd authenticates; keep it outside `data_dir` | | ||
| 22 | | `ssh_socket` | `"/run/vole/ssh.sock"` | Socket `vole ssh-exec` reaches `vole serve` on when sshd authenticates; keep it outside `data_dir` | | ||
| 20 | 23 | | `instance_name` | `"Vole"` | Instance heading, document titles, and brand-link accessible name | | |
| 21 | 24 | | `instance_repo` | `"vole-instance"` | Repository that supplies instance customization; empty disables it | | |
| 22 | 25 | | `public_url` | empty | Canonical browser origin; HTTPS enables passkey sign-in | | |