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 with debuild -S
:
gpg: skipped "User <[email protected]>": secret key not available
To fix this, I go through the following steps:
Ensure I have proper gpg keys set up. You can check if yours is installed properly using:
gpg --list-keys
Add
DEBEMAIL
andDEBFULLNAME
to~/.bashrc
. EnsureDEBEMAIL
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.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).Make sure the same key is the default for debuilder: Edit /etc/devscripts.conf with the folllowing:
DEBSIGN_KEYID=XXXXXX
whereXXXXXX
is your key.Now next time you use
debuild -S
it should use the proper gpg key, name and email address!