Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm using dpkg-buildpackage and I would like to fully automate my scripts, but I cannot find how to GPG sign the packages and automate entering the pass phrases in my Continuous Integration System. I don't want to use the '-us -uc' parameters, because I do want to sign them.

Any ideas?

share|improve this question
Maybe a solution using debsign, see this answer –  Raffi Aug 24 at 20:04

1 Answer 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)


export DEBEMAIL=""
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.

share|improve this answer
How to make it persistent? The agent asks on every build. –  Velkan Apr 29 at 7:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.