Skip to content

Finish SSH signing setup and add git defaults - #7

Merged
maximn merged 5 commits into
mainfrom
ssh-signing-and-git-defaults
Oct 10, 2026
Merged

maximn merged 5 commits into
mainfrom
ssh-signing-and-git-defaults

Conversation

@maximn

@maximn maximn commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Stacked on #6 so the diff stays clean; GitHub will retarget it to main once that merges.

setup.sh turned on SSH commit signing but never set an allowed signers file, so git log --show-signature printed an error instead of verifying the signature it had just made. And without ~/.ssh/config, the key's passphrase is asked for again and again.

  • Writes ~/.ssh/allowed_signers from your git email and signing key, and points gpg.ssh.allowedSignersFile at it. If you already have one, it leaves it alone and says whether your key is in it; if user.email isn't set yet, it says to set it and re-run.
  • Appends a Host * block with UseKeychain and AddKeysToAgent to ~/.ssh/config, behind IgnoreUnknown so non-Apple OpenSSH doesn't choke on it. Creates ~/.ssh as 700 and the file as 600 when they're missing, and skips the whole step if the file already sets UseKeychain.
  • dotfiles/gitconfig gains newer defaults: diff.algorithm=histogram, rebase.autoStash, rebase.updateRefs, push.followTags, commit.verbose, branch.sort=-committerdate, tag.sort=version:refname, column.ui=auto and help.autocorrect=prompt.
  • The CI snapshot from Keep going when brew bundle fails, and run setup.sh in CI #6 now covers ~/.ssh/config and ~/.ssh/allowed_signers too.

Tested against throwaway HOME directories: a real commit verifies as Good "git" signature, a second run reports everything already set up and changes nothing, and the key-without-email and no-key-at-all paths both do the right thing.

🤖 Generated with Claude Code

maximn and others added 5 commits October 10, 2026 20:36
setup.sh turned on SSH commit signing but set no allowed signers file, so
git log --show-signature printed an error instead of verifying. It now writes
~/.ssh/allowed_signers (from your git email and signing key) and points
gpg.ssh.allowedSignersFile at it, unless you already have one.

It also appends a Host * block to ~/.ssh/config with UseKeychain and
AddKeysToAgent, so the key passphrase is asked for once, unless the file
already sets UseKeychain.

dotfiles/gitconfig gains newer defaults: histogram diffs, rebase autoStash
and updateRefs, push.followTags, commit.verbose, branches sorted by recent
commit, version-sorted tags, columns, and help.autocorrect=prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from brew-bundle-keep-going to main October 10, 2026 21:02
@maximn
maximn merged commit 3af38ef into main Oct 10, 2026
5 checks passed
@maximn
maximn deleted the ssh-signing-and-git-defaults branch October 10, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant