Menu

Tree [3ffe25] default tip /
 History

Read Only access


File Date Author Commit
 keyring_gpgagent 2015-08-31 David Handy David Handy [a4612d] Higher priority for headless systems
 .hgignore 2015-08-13 David Handy David Handy [6c9c4b] Begin developing keyring-gpgagent: keyring back...
 LICENSE.txt 2019-08-21 David Handy David Handy [08e965] Add license file
 README.rst 2015-09-01 David Handy David Handy [d75ecd] Update doc files
 TODO.txt 2015-09-01 David Handy David Handy [d75ecd] Update doc files
 requirements.txt 2015-08-13 David Handy David Handy [6c9c4b] Begin developing keyring-gpgagent: keyring back...
 technotes.rst 2015-09-01 David Handy David Handy [d75ecd] Update doc files

Read Me

keyring-gpgagent

Adds support to python-keyring for using GPG Agent to store passwords. This enables applications to securely access passwords that are not stored on the disk, even on "headless" servers.

Requirements

Requires GPG-agent 2.0.x

Tested on:
  • Ubuntu 10.04, gnupg-agent 2.0.14
  • Ubuntu 14.04, gnupg-agent 2.0.22

Installation

Run these commands:

pip install keyring-gpgagent
# To run tests:
pip install nose

Configuration

Enable gpg-agent to cache passphrases:

mkdir -p ~/.gnupg
echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf

Prevent Gnome-Keyring from replacing GPG-agent:

mkdir ~/.config/autostart
cp /etc/xdg/autostart/gnome-keyring-gpg.desktop ~/.config/autostart/
echo 'Hidden=true' >> ~/.config/autostart/gnome-keyring-gpg.desktop

Log out and log back in to make this change take effect.

Testing

Start gpg-agent and set GPG_AGENT_INFO:

eval $(gpg-agent --daemon)

Run the tests:

nosetests --all-modules

Stop gpg-agent (if it is not needed):

echo $GPG_AGENT_INFO
# The number after the first ":" is the gpg-agent process ID.
# Kill that process.
unset GPG_AGENT_INFO