vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Add remote administration and local workflow runs
3abbe749096f4d7ff76f4d468e4427829b8a6f95 · Keenan Nemetz · 16d ago · parent 520470e1
Add remote administration and local workflow runs Make `vole admin` the single namespace for user, repository, and access management, runnable locally or over SSH by instance admins. Instance-admin grants live in users.db, and the audit log names the actor separately from the account being changed. Add `vole workflow run` to execute workflow jobs in the working tree without a server or runner. Positional arguments select workflows, --job selects jobs, and the command reuses the push-time validator. Update the README and guides for the new command shapes.
docs/users-and-access.md +45−16
| @@ -19,13 +19,13 @@ file locks. Nothing in the file is secret. Vole reloads it every few seconds, so | |||
| 19 | 19 | key changes and retirements take effect without restarting the server. | |
| 20 | 20 | ||
| 21 | 21 | ```sh | |
| 22 | vole user create alice | ||
| 23 | vole user add-key alice --key ~/.ssh/id_ed25519.pub | ||
| 24 | vole user list | ||
| 25 | vole user rm-key alice SHA256:... | ||
| 26 | vole user rename alice a-alice | ||
| 27 | vole user retire alice | ||
| 28 | vole user backup backup/users.db | ||
| 22 | vole admin user create alice | ||
| 23 | vole admin user add-key alice --key ~/.ssh/id_ed25519.pub | ||
| 24 | vole admin user list | ||
| 25 | vole admin user rm-key alice SHA256:... | ||
| 26 | vole admin user rename alice a-alice | ||
| 27 | vole admin user retire alice | ||
| 28 | vole admin user backup backup/users.db | ||
| 29 | 29 | ``` | |
| 30 | 30 | ||
| 31 | 31 | To see which account the current remote's key belongs to: | |
| @@ -35,6 +35,35 @@ vole whoami | |||
| 35 | 35 | vole whoami --id | |
| 36 | 36 | ``` | |
| 37 | 37 | ||
| 38 | ## Remote administration | ||
| 39 | |||
| 40 | By default, server management commands run on the host. To use them from another | ||
| 41 | machine, mark an account as an **instance admin** and pass `--remote`: | ||
| 42 | |||
| 43 | ```sh | ||
| 44 | vole admin user grant-admin alice | ||
| 45 | vole admin --remote ssh://git@forge.example.com:2222 user create bob | ||
| 46 | vole admin --remote origin user add-key bob --key bob.pub | ||
| 47 | vole admin --remote origin repo create demo --owner bob | ||
| 48 | vole admin --remote origin acl default demo read | ||
| 49 | ``` | ||
| 50 | |||
| 51 | An instance admin is not the same as a repository admin. A repository admin can | ||
| 52 | manage that repository's branches and reviews; an instance admin can create users | ||
| 53 | and repositories and change access rules anywhere. Only instance admins may use | ||
| 54 | `--remote`. | ||
| 55 | |||
| 56 | The first instance admin must be granted on the host. Vole refuses to remove or | ||
| 57 | retire the last active instance admin, so a remote mistake cannot lock everyone | ||
| 58 | out. Add `--json` to any remote command for a machine-readable response: | ||
| 59 | |||
| 60 | ```sh | ||
| 61 | vole admin --remote origin --json user list | ||
| 62 | ``` | ||
| 63 | |||
| 64 | Backups, garbage collection, and index rebuilds stay on the host; they are | ||
| 65 | recovery operations, not remote administration. | ||
| 66 | |||
| 38 | 67 | ## Roles | |
| 39 | 68 | ||
| 40 | 69 | Each repository has a default role for everyone and optional roles for specific | |
| @@ -54,20 +83,20 @@ tell whether they exist. | |||
| 54 | 83 | To publish a repository, give the default role `read`: | |
| 55 | 84 | ||
| 56 | 85 | ```sh | |
| 57 | vole acl default demo read | ||
| 86 | vole admin acl default demo read | ||
| 58 | 87 | ``` | |
| 59 | 88 | ||
| 60 | 89 | ## Changing access | |
| 61 | 90 | ||
| 62 | 91 | ```sh | |
| 63 | vole acl show demo | ||
| 64 | vole acl set demo alice write | ||
| 65 | vole acl set demo bob read | ||
| 66 | vole acl default demo read | ||
| 67 | vole acl protect demo refs/heads/main | ||
| 68 | vole acl approvals demo 2 | ||
| 69 | vole acl checks demo on | ||
| 70 | vole acl runners demo ci-runner-1 | ||
| 92 | vole admin acl show demo | ||
| 93 | vole admin acl set demo alice write | ||
| 94 | vole admin acl set demo bob read | ||
| 95 | vole admin acl default demo read | ||
| 96 | vole admin acl protect demo refs/heads/main | ||
| 97 | vole admin acl approvals demo 2 | ||
| 98 | vole admin acl checks demo on | ||
| 99 | vole admin acl runners demo ci-runner-1 | ||
| 71 | 100 | ``` | |
| 72 | 101 | ||
| 73 | 102 | - `set` gives one account a role. | |