Commit 31d3d46d46

31d3d46d466c41ba819405b4e934fe98c34f73dc

parent: 975f1af176

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-02 01:18 UTC

Admin: host-local commands dispatch into the registry

Ref krz/gitbay#72

Layout: unified · split

Admin.org +9
@@ -122,6 +122,14 @@ be public (the module path itself confirms it exists).
122 122
123* Users, email, invites 123* Users, email, invites
124 124
125Every =gitbayd admin= subcommand except =backup=, =gc= and the one-shot
126backfills is a wrapper that dispatches the registry command of the same
127name as the host: an admin context with no account behind it, so its
128audit rows carry no actor and =source: host=. The same commands run in an
129instance admin's SSH session (=ssh git@<host> admin ...=) and write the
130same rows with the key fingerprint as source. One implementation, two
131credentials.
132
125#+begin_src sh 133#+begin_src sh
126gitbayd admin user create alice --key alice.pub --email a@example.org --verified [--admin] 134gitbayd admin user create alice --key alice.pub --email a@example.org --verified [--admin]
127gitbayd admin email verify alice a@example.org # admin assertion, no SMTP needed 135gitbayd admin email verify alice a@example.org # admin assertion, no SMTP needed
@@ -193,6 +201,7 @@ push.
193 201
194#+begin_src sh 202#+begin_src sh
195gitbayd admin stats [--json] # counts, database size, per-repo disk 203gitbayd admin stats [--json] # counts, database size, per-repo disk
204ssh git@<host> admin stats [--json] # the same, from an admin session
196gitbayd admin gc [--repo owner/name] # git gc: repack and prune; per-repo sizes 205gitbayd admin gc [--repo owner/name] # git gc: repack and prune; per-repo sizes
197gitbayd admin gc --aggressive # thorough repack; slow, rarely needed 206gitbayd admin gc --aggressive # thorough repack; slow, rarely needed
198#+end_src 207#+end_src