Skip to content

Instantly share code, notes, and snippets.

@luislavena
Created August 13, 2015 21:15
Show Gist options
  • Save luislavena/41c7cdbfbe2ea0b46968 to your computer and use it in GitHub Desktop.
Save luislavena/41c7cdbfbe2ea0b46968 to your computer and use it in GitHub Desktop.
Setup GnuPG agent on systemd (Ubuntu)
# place unit in /etc/systemd/system/[email protected]
# start and enable with `systemctl start|enable gpg-agent@username`
[Unit]
Description=GnuPG private key agent for %I
IgnoreOnIsolate=true
[Service]
User=%i
Type=forking
ExecStart=/usr/bin/gpg-agent --daemon --write-env-file "${HOME}/.gpg-agent-info"
ExecStop=/usr/bin/pkill gpg-agent
Restart=on-abort
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment