-
-
Save ludwig/bbe88409944d6b1d4f7e to your computer and use it in GitHub Desktop.
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
# Inser this snippet into your ~/.bash_profile | |
# Set up the GPG Agent | |
# http://fvue.nl/wiki/Debian_4.0:_Installing_gpg-agent | |
if [ -f ${HOME}/.gpg-agent-info ] && \ | |
kill -0 $(cut -d: -f 2 ${HOME}/.gpg-agent-info) | |
then | |
# Yes, '.gpg-agent-info' points to valid gpg-agent process; | |
# Indicate gpg-agent process | |
GPG_AGENT_INFO=$(cat ${HOME}/.gpg-agent-info | cut -c 16-) | |
else | |
# No, no valid gpg-agent process available; | |
# Start gpg-agent | |
eval $(gpg-agent --daemon --no-grab --write-env-file ${HOME}/.gpg-agent-info) | |
fi | |
export GPG_TTY=$(tty) | |
export GPG_AGENT_INFO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment