Repository navigation
chore: use a known SSH key for the local Phorge's admin - #595
Merged
Merged
Conversation
`make deploy` generated the admin's SSH key into k8s/base/ssh/ of the worktree that deployed, so every other worktree sharing the k3d instance had no key: git over SSH did not work there, and tests/k8s/test_ssh.py and `kubectl kustomize k8s/overlays/ci` failed for want of the file. Commit a known key instead, k8s/base/ssh/phabfive-insecure, public on purpose like api-supersecr3tapikeyfordevelop1. ssh refuses a private key others can read and git checks it out 0644, so `make deploy` and `make ssh-forward` use a 0600 copy in .k8s/, and test_ssh.py makes its own. `make reset` keeps the key, and `make validate` no longer needs one generated. The seed adds the new key next to an old one, so a running instance needs no reset. `make creds` prints the full GIT_SSH_COMMAND with StrictHostKeyChecking=accept-new, since each reset brings a new host key. detect-private-key excludes the file. trufflehog reports it only as unverified, which CI and the hook do not fail on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make deploygenerated the admin's SSH key intok8s/base/ssh/of whichever worktree deployed. Every other worktree sharing the k3d instance had no key: git over SSH did not work there, andtests/k8s/test_ssh.pyandkubectl kustomize k8s/overlays/ci(intest-k8s) failed for want of the file.What changes
k8s/base/ssh/phabfive-insecure(commentphabfive-insecure), the way the API tokenapi-supersecr3tapikeyfordevelop1is committed.k8s/base/ssh/README.mdanddocs/phorge-setup.mdsay it is public and must never be authorized anywhere elsemake deployandmake ssh-forwardcopy it to.k8s/phabfive-insecurewith mode 0600 (SSH_KEY), andtest_ssh.pymakes its own 0600 copy intmp_path. kustomize still reads only the.pub, in placemake resetkeeps the key and still deletes.k8s/known_hosts.make validateno longer depends on a generated keyStrictHostKeyChecking=accept-new:make creds(the banner) now prints the wholeGIT_SSH_COMMANDwith it, alongsidemake ssh-forwardand the docs, which already had it. Eachmake resetbrings a new host keysshkeysseed adds the new key next to the old generated one on the next start (it skips only an identical key body). The Phorge key name is nowphabfive-insecureinstead ofphabfive-devdetect-private-keyexcludes the one file. trufflehog 3.99.2 reports it as unverified only, and both CI and the pre-commit hook run with--results=verified,unknown, so it needs no exclusion. GitHub push protection did not block the pushVerified
make validatepasses for every overlay.make .k8s/phabfive-insecuremakes a 0600 copyk8s/base/ssh/, and it reported only the unverified result above)Deploy and test … in k3djob, which this PR triggers because it touchesk8s/, runstest_ssh.pyon a fresh cluster with the new key🤖 Generated with Claude Code