Skip to content

Fix SSH commit signing: quoting in gpg.ssh.defaultKeyCommand - #26

Open
akan72 wants to merge 1 commit into
mainfrom
akan72/fix-ssh-signing
Open

Fix SSH commit signing: quoting in gpg.ssh.defaultKeyCommand#26
akan72 wants to merge 1 commit into
mainfrom
akan72/fix-ssh-signing

Conversation

@akan72

@akan72 akan72 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix SSH commit and tag signing by removing shell quoting from gpg.ssh.defaultKeyCommand.
  • Use ssh-add -L directly so Git receives a valid public key.
  • Stack position 1 of 15 and the base of stack #38.

Test Plan

  • Ran the complete installer in a fresh synthetic home on the Mac mini.
  • Executed the parsed signing command before and after; the baseline failed while this PR returned an ssh-ed25519 public key.
  • Ran git diff --check and verified the rewritten commit contains a valid SSH signature block.
  • Screenshots: not applicable; validation was CLI-based.

git's config parser consumes the double quotes and \n escapes in the old
printf wrapper before the shell sees them, so the wrapper executed the
ssh-add output as a command and emitted a bare 'key::' — every commit and
tag failed with 'user.signingKey needs to be set for ssh signing'.

git only takes the first line of defaultKeyCommand output, so a bare
ssh-add -L does the job with no quoting at all. This commit is itself
signed via the fixed command.
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