Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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/cli.md +57−35

@@ -11,8 +11,9 @@ with code `129`, just like Git.
11 11
12 12 | Option | Used by | Meaning |
13 13 |---|---|---|
14 | `--config <path>` | Commands that read local settings | Use a different `vole.toml` (default `vole.toml`) |
15 | `--remote <name>` | Issue, request, release, and pages commands | Git remote that points at the instance (default `origin`) |
14 | `--config <path>` | Local server management | Use a different `vole.toml` (default `vole.toml`) |
15 | `--remote <name\|url>` | `admin`, issue, release, and pages commands | Git remote or instance SSH URL to talk to |
16 | `--json` | `admin --remote` | Print the server's JSON response |
16 17 | `--no-push` | `issue`, `request` | Commit locally without pushing |
17 18 | `--dir <path>` | `init`, `workflow`, `runner` | Working or checkout directory |
18 19 | `--branch <name>` | `pages` | Site branch (default `pages`) |
@@ -26,51 +27,79 @@ before or after arguments.
26 27 ## Instance
27 28
28 29 ```sh
29 vole init [--dir <path>]
30 vole admin init [--dir <path>]
30 31 vole serve [--config <path>] [--log debug]
31 32 vole version
32 33 ```
33 34
34 ## Users
35 ## Server management
36
37 `vole admin` is the single namespace for user, repository, and access management.
38 Without `--remote`, it changes the instance named by the local `vole.toml`. With
39 `--remote`, it sends the same command over SSH and must be run by an instance
40 admin.
41
42 ```sh
43 vole admin user create alice
44 vole admin --remote origin user create bob
45 vole admin --remote ssh://git@forge.example.com:2222 user list
46 ```
47
48 See [Users and access](users-and-access.md#remote-administration).
49
50 ### Users
35 51
36 52 ```sh
37 vole user create <name>
38 vole user add-key --key <file|-> <name|id>
39 vole user rm-key <name|id> <fingerprint>
40 vole user rename <name|id> <new-name>
41 vole user retire <name|id>
42 vole user list
43 vole user backup <path>
53 vole admin user create <name>
54 vole admin user add-key --key <file|-> <name|id>
55 vole admin user rm-key <name|id> <fingerprint>
56 vole admin user rename <name|id> <new-name>
57 vole admin user retire <name|id>
58 vole admin user grant-admin <name|id>
59 vole admin user revoke-admin <name|id>
60 vole admin user show <name|id>
61 vole admin user list
62 vole admin user backup <path>
44 63 vole whoami [--id] [--remote <name>]
45 64 ```
46 65
47 See [Users and access](users-and-access.md).
66 `user backup` writes a file on the host, so it is local-only.
48 67
49 ## Repositories
68 ### Repositories
50 69
51 70 ```sh
52 vole repo create --owner <user> <name> [--description <text>]
53 vole repo list
54 vole repo rename <old> <new>
55 vole repo delete <name>
71 vole admin repo create --owner <user> <name> [--description <text>]
72 vole admin repo list
73 vole admin repo show <name>
74 vole admin repo rename <old> <new>
75 vole admin repo delete <name>
56 76 ```
57 77
58 78 New repositories are private. The owner becomes the first admin.
59 79
60 ## Access
80 ### Access
61 81
62 82 ```sh
63 vole acl show <repo>
64 vole acl set <repo> <user> <none|read|write|admin>
65 vole acl default <repo> <none|read|write|admin>
66 vole acl protect <repo> <ref-pattern>...
67 vole acl approvals <repo> <n>
68 vole acl checks <repo> <on|off>
69 vole acl runners <repo> [<user>...] [--add <user> | --remove <user> | --clear]
83 vole admin acl show <repo>
84 vole admin acl set <repo> <user> <none|read|write|admin>
85 vole admin acl default <repo> <none|read|write|admin>
86 vole admin acl protect <repo> <ref-pattern>...
87 vole admin acl approvals <repo> <n>
88 vole admin acl checks <repo> <on|off>
89 vole admin acl runners <repo> [<user>...] [--add <user> | --remove <user> | --clear]
70 90 ```
71 91
72 92 See [Users and access](users-and-access.md) and [CI](ci.md).
73 93
94 ### Maintenance
95
96 ```sh
97 vole admin gc [--dry-run] [--grace <duration>]
98 vole admin index rebuild
99 ```
100
101 These are local-only. See [Operations](operations.md).
102
74 103 ## Issues
75 104
76 105 ```sh
@@ -133,18 +162,11 @@ See [Sites](sites.md).
133 162 vole runner --remote <ssh-url> [--once] [--dir <path>] [--repos <name>]... [--label <name>]...
134 163 vole workflow check [--dir <path>]
135 164 vole workflow list [--dir <path>]
165 vole workflow run [--dir <path>] [<workflow>...] [--job <id>]...
136 166 ```
137 167
138 See [CI](ci.md).
139
140 ## Maintenance
141
142 ```sh
143 vole gc [--dry-run] [--grace <duration>]
144 vole index rebuild
145 ```
146
147 See [Operations](operations.md).
168 `workflow run` executes steps in the working tree, with no server or runner. See
169 [CI](ci.md#run-a-workflow-locally).
148 170
149 171 ## Internal
150 172