- Install gpg and gpg-agent:
brew install gpg gpg-agent - Generate a new key: run
gpg --gen-keyand follow the instructions - Write down the ID of the key. To do this, run
gpg --list-keys. The output will look like this:
pub 4096R/E9468C9A 2016-04-20 [expires: 2016-07-19]
uid Andreas B.