triston-notes/+ Encounters/GPG on Mac.md

27 lines
898 B
Markdown
Raw Normal View History

2024-12-12 15:13:55 +00:00
# GPG on mac
Run `brew upgrade gnupg`, not really sure why atm
PinEntry-Mac is needed for gpg
Run `brew install pinentry-mac`
Now run the following to put stuff where it needs to go
`echo "pinentry-program $(brew --prefix)/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
`
Now just kill the existin process to start a new
`killall gpg-agent`
Run the following command to test if gpg is working properly, should see a bunch of bullshit print out
`echo "test" | gpg --clearsign # on linux it's gpg2 but brew stays as gpg`
Now if the following has been done yet, can set the global configs so we're always signing commits by default
```
git config --global gpg.program gpg # perhaps you had this already? On linux maybe gpg2
git config --global commit.gpgsign true # if you want to sign every commit
```
Use the following to verify you signed the commit properly
`git log --show-signature -1
`