Skip to content

fix: configure pinentry-mac and GPG_TTY for commit signing#6

Merged
Jense5 merged 1 commit into
mainfrom
Jense5/fix-gpg-signing
Mar 27, 2026
Merged

fix: configure pinentry-mac and GPG_TTY for commit signing#6
Jense5 merged 1 commit into
mainfrom
Jense5/fix-gpg-signing

Conversation

@Jense5
Copy link
Copy Markdown
Contributor

@Jense5 Jense5 commented Mar 27, 2026

Summary

  • Adds pinentry-mac to Brewfile.dev so GPG can use macOS native passphrase dialogs
  • Exports GPG_TTY=$(tty) in zshrc so GPG knows which terminal to use
  • Updates module 06-git to configure gpg-agent.conf with pinentry-mac when available

Context

After SSH key changes, GPG commit signing broke with:

gpg: signing failed: Inappropriate ioctl for device

Root cause: GPG_TTY was never set and only the curses-based pinentry was installed, which can't prompt for a passphrase in non-interactive contexts.

Test plan

  • Run mbp setup --module git and verify pinentry-mac is configured in ~/.gnupg/gpg-agent.conf
  • Open a new terminal and verify echo $GPG_TTY returns a tty path
  • Make a signed commit and confirm the macOS passphrase dialog appears

🤖 Generated with Claude Code

GPG signing fails with "Inappropriate ioctl for device" because GPG_TTY
is not set and pinentry-mac is not installed/configured. This adds:
- pinentry-mac to Brewfile.dev
- GPG_TTY export to zshrc
- pinentry-mac configuration in the git module's GPG setup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Jense5 Jense5 merged commit 165f611 into main Mar 27, 2026
2 checks passed
@Jense5 Jense5 deleted the Jense5/fix-gpg-signing branch March 27, 2026 13:21
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