Repository navigation
Add --gh-keys so sshd setup can run without prompts - #7086
Merged
Merged
Conversation
Grabbing keys from GitHub was reachable only through the interactive menu: pick "Grab key from GitHub", then type the username into a second prompt. So the one path that needs no secret pasted around was also the one path a script could not take, and setting a machine up over ssh or from a provisioning run meant falling back to --key with a key copied by hand. --gh-keys <username> takes the same path the prompt did. The fetch and authorize logic is unchanged and now shared, with the prompt reduced to asking for the username and handing it over. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The username was only checked for being absent entirely, and only after the server was installed and the firewall opened. So `--gh-keys=` with an unset variable behind it configured the machine and then dropped into the interactive menu, and `--gh-keys --help` took --help as the username and set the server up on its way to failing the fetch -- a help flag that changes the system. Check the value where it is parsed, and reject one that is empty or shaped like an option. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
torturado
pushed a commit
to torturado/omarchy
that referenced
this pull request
Aug 19, 2026
* Add --gh-keys so sshd setup can run without prompts Grabbing keys from GitHub was reachable only through the interactive menu: pick "Grab key from GitHub", then type the username into a second prompt. So the one path that needs no secret pasted around was also the one path a script could not take, and setting a machine up over ssh or from a provisioning run meant falling back to --key with a key copied by hand. --gh-keys <username> takes the same path the prompt did. The fetch and authorize logic is unchanged and now shared, with the prompt reduced to asking for the username and handing it over. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Reject a missing --gh-keys username before setting anything up The username was only checked for being absent entirely, and only after the server was installed and the firewall opened. So `--gh-keys=` with an unset variable behind it configured the machine and then dropped into the interactive menu, and `--gh-keys --help` took --help as the username and set the server up on its way to failing the fetch -- a help flag that changes the system. Check the value where it is parsed, and reject one that is empty or shaped like an option. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
jnadeau207-collab
pushed a commit
to jnadeau207-collab/omarchy-7-ultimate
that referenced
this pull request
Aug 26, 2026
* Add --gh-keys so sshd setup can run without prompts Grabbing keys from GitHub was reachable only through the interactive menu: pick "Grab key from GitHub", then type the username into a second prompt. So the one path that needs no secret pasted around was also the one path a script could not take, and setting a machine up over ssh or from a provisioning run meant falling back to --key with a key copied by hand. --gh-keys <username> takes the same path the prompt did. The fetch and authorize logic is unchanged and now shared, with the prompt reduced to asking for the username and handing it over. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Reject a missing --gh-keys username before setting anything up The username was only checked for being absent entirely, and only after the server was installed and the firewall opened. So `--gh-keys=` with an unset variable behind it configured the machine and then dropped into the interactive menu, and `--gh-keys --help` took --help as the username and set the server up on its way to failing the fetch -- a help flag that changes the system. Check the value where it is parsed, and reject one that is empty or shaped like an option. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
nick1udwig
pushed a commit
to nick1udwig/omarchy
that referenced
this pull request
Sep 9, 2026
* Add --gh-keys so sshd setup can run without prompts Grabbing keys from GitHub was reachable only through the interactive menu: pick "Grab key from GitHub", then type the username into a second prompt. So the one path that needs no secret pasted around was also the one path a script could not take, and setting a machine up over ssh or from a provisioning run meant falling back to --key with a key copied by hand. --gh-keys <username> takes the same path the prompt did. The fetch and authorize logic is unchanged and now shared, with the prompt reduced to asking for the username and handing it over. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Reject a missing --gh-keys username before setting anything up The username was only checked for being absent entirely, and only after the server was installed and the firewall opened. So `--gh-keys=` with an unset variable behind it configured the machine and then dropped into the interactive menu, and `--gh-keys --help` took --help as the username and set the server up on its way to failing the fetch -- a help flag that changes the system. Check the value where it is parsed, and reject one that is empty or shaped like an option. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Grabbing keys from GitHub was reachable only through the interactive menu: pick "Grab key from GitHub", then type the username into a second prompt. So the one path that needs no secret pasted around was also the one path a script could not take, and setting a machine up over ssh or from a provisioning run meant falling back to
--keywith a key copied by hand.--gh-keys <username>takes the same path the prompt did. The fetch and authorize logic is unchanged and now shared, with the prompt reduced to asking for the username and handing it over.--gh-keys=<username>works too, matching the existing--key=form. Passing both--keyand--gh-keysis rejected rather than silently preferring one, and--gh-keyswith no username exits 2 instead of fetchinghttps://github.com/.keys.Verified on a clean Omarchy VM:
--gh-keys dhhwith no tty authorizes both published keys, enablessshd, and adds the rate-limited ufw rule; a second run reports both as already authorized and leaves the file at three lines; an unknown username exits 1 with the existing error; and the interactive menu still works../test/clipasses 116/116, which covers the command metadata.