1# An admin (forge.admins in the server's git config) runs the operator's2# people commands over ssh: invite prints the one-time link, invites lists3# and takes back, users lists everyone, and help lists them. The server4# forms (forge user invite, ...) still work, for anyone on the server.5. "$(dirname "$0")/../lib.sh"6user cat7user ana8repo cat/0129export FORGE_BASE_URL=https://forge.test10git config --file "$FORGE_ROOT/.gitconfig" --add forge.admins "dami, cat"1112ok ssh_as cat invite fox --ttl 2d --repo cat/012 --as collaborator13has "$T_LOG" '^ https://forge\.test/login/#invite=[A-Za-z0-9_-]{24}$'14has "$T_LOG" 'until 2026-09-03 00:00 UTC'15has "$T_LOG" 'ssh git@forge\.test invites rm fox takes the link back'16ok ssh_as cat invites17has "$T_LOG" '^fox +2026-09-01 00:00 +2026-09-03 00:00 +collaborator of cat/012$'18ok ssh_as cat users19eq "$(head -n 3 "$T_LOG")" "user keys passkeys tokens20ana 1 0 021cat 1 0 0"22fails_with "fox is invited already \(ssh git@forge\.test invites rm fox" ssh_as cat invite fox23fails_with "^forge: usage: invite <name>" ssh_as cat invite24fails_with "^forge: usage: users$" ssh_as cat users now25ok ssh_as cat invites rm fox26eq "$(output)" "took back the invite for fox; its link is dead"27ok ssh_as cat invites28eq "$(output)" "no invites; ssh git@forge.test invite <name> makes one"2930ok ssh_as cat help31has "$T_LOG" '^for admins of the forge:$'32for c in 'invite <name> \[--ttl 7d\]' 'invites \[rm <name>\]' 'users '; do has "$T_LOG" "^ $c"; done3334# The server's forms, as before.35ok forge user invite owl36has "$T_LOG" 'forge user invites rm owl takes the link back'37ok forge users38has "$T_LOG" '^owl '