feat: add gpg signing key bootstrap script - #2
Open
cwaits6 wants to merge 1 commit into
Open
Conversation
Generates an RSA-4096 GPG key, uploads the public half to GitHub via the API, and repoints global git signing at the new fingerprint. Prompts for identity and expiry, defaulting name/email from existing git config. Backs up ~/.gitconfig before writing, and aborts before touching git config if the GitHub upload fails so the local config never points at a key GitHub does not have.
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.
Adds
scripts/gpg-signing-key/— generates a fresh RSA-4096 GPG key, registers the public half with GitHub via the API, and repoints global git signing at it.Written after an expired signing key turned into a multi-step manual cleanup (extend expiry, re-export, delete and re-add on each forge, update every consumer). This collapses the new-key path into one prompted run.
Behavior
gpg/git/gh/jqand theadmin:gpg_keyscope, exiting before any change if either is missing~/.gitconfigto a timestamped copy before writing signing configNotes
mktempparams file that is shredded on exitbash -nclean