Setting up a new macOS laptop means re-installing a slew of productivity tools. Coming from regularly using Linux, I realized that I was a bit spoiled when switching to Mac for Float, especially as it relates to package/application management.
One essential application that never gets any love is your trusty GPG client (or PGP or GnuPG or whatever you want to call it).
Every guide I've found online for using GPG on Mac involves installing GPG Tools, but I can't stand for it. I've used it in the past when I last had a Mac a few years ago, and it just felt like a bloated freemium product that is always trying to get me to upgrade and pay money. In addition, I like feeling cool and only using the command line where possible, so the GUI on this application isn't something I'd use regularly.
Instead, to my relief, there is a straightforward method to get a GPG client installed on Mac without installing GPG Tools.
Setting up GPG
For the easiest installation of GPG, Homebrew package manager is the tool to use. Similar to Linux's
rpm package managers, it allows us to do a quick one-line installation.
The setup for Homebrew is quick and easy, so you should be done in < 5 minutes once everything is downloaded and installed.
In short, there are three simple command to get you going. The first line installs Homebrew and its dependencies, and the last two add it to your terminal path so you can reference is as
brew on the command line.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
If this is a new machine, you might need to install some XCode dependencies during this process, adding to the total installation time.
We're going to install good old gnupg as our GPG client. You have to love a simple, open-source project with a strong track record. If you're familiar with using GPG on Linux, you'll probably feel right at home!
brew install gnupg
Woah, that was fast! And voila, you're up and running with GPG on macOS!
What's next you might ask? You probably want to start creating some GPG keys to actually use. You can find out how to do this in my article here: https://mikeross.xyz/creating-a-gpg-key-pair-with-subkey/