Created
February 11, 2016 05:48
-
-
Save 5thWall/97db8e5f1c63de8041d5 to your computer and use it in GitHub Desktop.
Configure gpg-agent on a mac.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Place in $HOME/Library/LaunchAgents/gpg-agent.plist | |
--> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>gpg-agent</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/gpg-agent</string> | |
<string>--daemon</string> | |
<string>--enable-ssh-support</string> | |
<string>--write-env-file</string> | |
<string>/Users/5thWall/.gpg-agent-info</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to your .[bash|zsh]rc | |
if [[ $(uname) == Darwin ]]; then | |
if [ -f "${HOME}/.gpg-agent-info" ]; then | |
. "${HOME}/.gpg-agent-info" | |
export GPG_AGENT_INFO | |
export SSH_AUTH_SOCK | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment