Here are some OS X GPG tricks and tips for clearsign, GPG for Mail for Signing Emails, Code Signing and all the stuffs you need for development. Essentially, you are following our typical configuration on OS X (10.10 and higher) for iTerm2, ZSH, Homebrew. This is mandatory part – you must have all the components updated including XQuartz, Xcode Commandline Tools.
OS X GPG Tricks and Tips : Basics
If you are doing these works for developing and distributing software via Launchpad, basically your mind always ring – “It is OS X and Work is to be done on Ubuntu”. No, OS X is FreeBSD plus some NetBSD – it is the kind of same kernel. It is not that classic UNIX. If you read the rarely used manuals like
man locate, you’ll basically see the examples with FreeBSD.
It is important to have a home-brew like package manager. You can use aptitude too! apt-get actually works on OS X. We are using Homebrew as it has the most documentation. It was better if the package manager named “App Store” was a sane species. Command line commands against App Store actually forces the GUI. To fully fix this App Store package manager, only way is to re-write the OS X as OpenSource. It is easier to use Homebrew and Cakebrew than thinking to change the World.
sudo has pathetic support on Homebrew. Anyway, first check your homebrew :
Fix if there is any error. If
brew updatethrows error like :
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
chmod 644 /usr/local/share/man/man1/brew.1 && brew update
If your setup is wrong, you can not run tmux – it is an indirect test to check anything suspicious when
brew doctor is not throwing any error. You should run :
brew install gnupg2
brew install gnupg
brew install gpg-agent
automatically, there should be two symlinks, if normally symlinks fails to get created, force it :
brew link --overwrite gpg-agent
brew doctor to check if the things are fine. You can read the manuals by running
OS X GPG Tricks and Tips : Setting Up the GUI Tool
The command line tool is very powerful but the GUI tool is easy. First we installed the stuffs via
homebrew package manager, now we will install the GUI tool actually using the
App Store package manager! The extra files are getting installed for OS X not being a Free Software. Go here :
Download and install the tool. Open this App, go to it’s “GPG Keychain” option’s preferences window and add this key server of your need, for Ubuntu Launchpad development, add :
All things will work fine. You can send an email to
email@example.com to get an auto responded message with Padlock sign. Without this proper setup, commands like:
gpg --clearsign UbuntuCodeofConduct-2.0.txt
will not work from command line. In case of conflict, you can easily remove any component.