secrets: distribute write-scoped Gitea PAT + homelab refresh-creds
Adds secrets/gitea-pat.yaml (SOPS-encrypted, dtoro PAT with read+write scopes) so any enrolled client can push to dtoro/Homelab-Docs — not just where I have SSH. Recipient set = hello.yaml's (hubris, apps, republic); expand alongside hello.yaml when enrolling new clients. bin/homelab gains 'refresh-creds': decrypts gitea-pat.yaml, rewrites /etc/homelab-context/git-credentials with the write token, repoints git's --system credential helper. Re-execs via sudo for non-root callers (same pattern as 'homelab secret'). After this lands, 'homelab client add/remove' and wiki edits can run from any client. The initial bootstrap still needs an operator-supplied read-only PAT (chicken-and-egg); 'refresh-creds' upgrades the client to write afterwards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,15 @@ creation_rules:
|
||||
age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
|
||||
age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6
|
||||
|
||||
- path_regex: ^secrets/gitea-pat\.yaml$
|
||||
# Write-scoped Gitea PAT (dtoro user). Same recipient list as hello.yaml
|
||||
# since every enrolled client should be able to push (homelab client
|
||||
# add/remove, wiki edits, etc.).
|
||||
age: >-
|
||||
age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
|
||||
age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
|
||||
age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6
|
||||
|
||||
- path_regex: ^secrets/gitea-tokens\.yaml$
|
||||
# Workstations only.
|
||||
age: >-
|
||||
|
||||
Reference in New Issue
Block a user