Investigating GnuPG Problems
From PsiWiki
First thing to know:
- Psi does not work with Cygwin GnuPG.
- Psi works with the native GnuPG build.
If you don't know the above thing, you are most likely using the correct build.
If Your Psi fails to work with GnuPG, for example Select key button is not available, please try these first:
- (linux and custom builds only) Is qca-gnupg installed?
- Does
gpg
execute properly from command line (ie. is it on Your $PATH or %PATH%)?
If it doesn't execute, add the GnuPG binary directory to the PATH.
On Windows, check the Windows Registry for GnuPG and make sure the paths point correctly to GnuPG dir and GnuPG keyrings. Here are the Registry keys You have to check:
-
HKEY_LOCAL_MACHINE\Software\GNU\GNUPG
should contain two string (REG_SZ) values: "HomeDir" and "gpgProgram". First one (HomeDir) giving the full path to directory with GnuPG binaries, the second one (gpgProgram) giving the full path to GnuPG binary (gpg.exe).
-
HKEY_CURRENT_USER\Control Panel\Mingw32\NLS
should contain one string (REG_SZ) value: "MODir", which gives the full path to the directory holding GnuPG translations (Locale subdirectory of GnuPG binaries directory).
-
- Does
psi
execute properly from the same command line?
- Does
- Try running Psi with GPG agent disabled(Psi 0.10 and lower only):
psi --no-gpg-agent
If Psi works this time, most likely your gpg is configured to use an agent, but there isn't an agent installed or running. Check your ~/.gnupg/gpg.conf (or GnuPG Windows Registry settings) for anything about agents (like "use-agent"). It is possible that other software might work with gpg when it is configured this way, but Psi is very picky.
- Make sure your key is not expired.
- Use a GnuPG debug build
- Windows - There is currently no recent GnuPG debug build for windows availible
- Linux - In Psi source, in src/src.pro file, uncomment line:
#DEFINES += GPG_DEBUG
near the beginning of the file to make it look like:
DEFINES += GPG_DEBUG
and recompile the source (full recompile - see below instructions). Now You have GnuPG debug enabled Psi build.
Full recompile instructions:
make distclean ./configure make make install
You need to execute
make distclean
to remove stale Makefile.
gpg --list-sigs
list Your key-sigs properly? Some keys might be corrupt!
Look especially if gpg throws messages like
gpg: buffer shorter than subpacket
do so by invoking
gpg --list-sig 2>&1| grep shorter
The reason for that might be a fishy key like the "global pgp verification key" 0xCA57AD7C. If you have that special key in your keyring you must delete it with
gpg --delete-keys 0xCA57AD7C

