Tuesday, September 10, 2013

use default gpg key for debuild

When using debuild -S to build a package on new machines, I need to go through the process of ensuring that my gpg is set up properly. If set up incorrectly, I get the following message in debuild -S:
gpg: skipped "User <user@host.com>": secret key not available

To fix this, I go through the following steps:

1) Ensure I have proper gpg keys set up. You can check if yours is installed properly using:
gpg --list-keys

2) Add DEBEMAIL and DEBFULLNAME to ~/.bashrc:
Ensure DEBEMAIL matches the email in the matching gpg key, and ensure DEBFULLNAME matches the name in same key. Put these into your ~/.bashrc file or wherever they will be sourced into your environment.

3) Make sure your key is the default key:
Edit ~/.gnupg/gpg.conf such that default-key is set to the proper key. This should match the 8 character fingerprint that you verified in (1).

4) Make sure the same key is the default for debuilder:
Edit /etc/devscripts.conf with the folllowing:
DEBSIGN_KEYID=XXXXXXXX

where XXXXXXX is your key.

5) Now next time you use debuild -S it should use the proper gpg key, name and email address!

No comments:

Post a Comment