-
Installation
brew install gnupg pinentry-mac && \
mkdir $GNUPGHOME && \
echo "pinentry-program /usr/local/bin/pinentry-mac" > \
"$GNUPGHOME/gpg-agent.conf"
- Generating new GPG key (RSA and RSA, 4096 bits)
gpg --full-generate-key
- Fixing permissions
chown -R $(whoami) $GNUPGHOME && \
chmod 700 $GNUPGHOME && \
chmod 600 $GNUPGHOME/* && \
chmod 700 $GNUPGHOME/*.d
- Copy public key in the clipboard
gpg --armor --export | pbcopy