How to automate the pass phrases when GPG signing dpkg-buildpackage?

Solution 1:

If your keyring is already unlocked, all you have to do is:

setup gpg-agent

So you won't be prompted for your passphrase a whole bunch of times...

sudo aptitude install gnupg-agent pinentry-gtk2 pinentry-curses
replace 0xD34DB33F with your GPG Key ID
export GPGKEY=0xD34DB33F
killall -q gpg-agent
eval $(gpg-agent --daemon)

and

export DEBEMAIL="[email protected]"
export DEBFULLNAME="Your full name as it appears on the GPG key"

from here

I can attest to the second part. The first part is a copy-paste, but it seems legitimate. I would think you would still have to unlock the key once, but it would stay unlocked.