Skip to content

Instantly share code, notes, and snippets.

@lucasassisrosa
Last active October 17, 2022 13:59
Show Gist options
  • Save lucasassisrosa/882af8827b96538164363f37fe7df8fc to your computer and use it in GitHub Desktop.
Save lucasassisrosa/882af8827b96538164363f37fe7df8fc to your computer and use it in GitHub Desktop.
GPG Setup + Pinentry - MacOS
# set git global config to always sign commits
$ git config --global gpg.program gpg
$ git config --global commit.gpgsign true
# pinentry to read gpg passphrase from git user.signingKey
$ brew install pinentry-mac
# set pinentry-mac as the default program
$ echo "pinentry-program $(which pinentry-mac)" > ~/.gnupg/gpg-agent.conf
# reset and restart daemon
$ killall gpg-agent
$ gpg-agent --daemon --pinentry-program /usr/local/bin/pinentry
# @TODO: Use pinentry-touchid to allow using Touch ID for fetching the password from the macOS keychain
# https://github.com/jorgelbg/pinentry-touchid - brew install pinentry-touchid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment