Skip to content

Instantly share code, notes, and snippets.

@mbrcknl
Created March 23, 2013 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbrcknl/5227083 to your computer and use it in GitHub Desktop.
Save mbrcknl/5227083 to your computer and use it in GitHub Desktop.
How I start gpg-agent on login to OS X. I use Macports gnupg2, with pinentry +qt4, though with a suitable adjustment to the PATH, this should work if you get your gnupg from somewhere else.
# ...
if [ -f ~/.gpg-agent-info ]; then
. ~/.gpg-agent-info
export GPG_AGENT_INFO
fi
# ...
#!/bin/bash
# Add this script to System Preferences -> Users & Groups -> your account -> Login Items
PATH=/opt/local/bin:$PATH
gpg-agent --daemon --write-env-file ~/.gpg-agent-info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment