Version
7.6.0.202603022253-r
Operating System
Windows
Bug description
I use gpg4win on a Windows device, which seems to default to storing GPG keys in the newer SQLite database format in $env:APPDATA/gnupg/public-keys.d/pubring.db.
Trying to commit with a signature throws in
|
throw new PGPException(MessageFormat.format( |
|
BCText.get().gpgNoPublicKeyFound, signingKey)); |
because the signing key I have configured in Git can't be found, because jgit+bc can't find the public key.
The very quick and dirty solution I had was to run
gpg-disable-keyboxd
gpg-enable-keyboxd
(those are not gpg sub-commands, they are individual binaries). If I've understood the problem properly disabling keyboxd wrote out a copy of all the keys in the .db file to $env:APPDATA/gnupg/pubring.kbx, which jgit+bc does find when trying to sign a commit.
Actual behavior
No stack trace, just an error message containing the text in gpgNoPublicKeyFound (Unable to find a public-key with key or user id: {0}) and searching the code shows this is the only place where the message text is used.
Expected behavior
jgit+bc should check and see if the use-keyboxd is in common.conf (https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration.html), and if it is it should query keyboxd (no idea how, sorry) for the keys, instead of rummaging around in the filesystem itself.
Relevant log output
Other information
No response
Version
7.6.0.202603022253-r
Operating System
Windows
Bug description
I use gpg4win on a Windows device, which seems to default to storing GPG keys in the newer SQLite database format in
$env:APPDATA/gnupg/public-keys.d/pubring.db.Trying to commit with a signature throws in
jgit/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
Lines 430 to 431 in b302b87
The very quick and dirty solution I had was to run
(those are not
gpgsub-commands, they are individual binaries). If I've understood the problem properly disabling keyboxd wrote out a copy of all the keys in the.dbfile to$env:APPDATA/gnupg/pubring.kbx, which jgit+bc does find when trying to sign a commit.Actual behavior
No stack trace, just an error message containing the text in
gpgNoPublicKeyFound(Unable to find a public-key with key or user id: {0}) and searching the code shows this is the only place where the message text is used.Expected behavior
jgit+bc should check and see if the
use-keyboxdis incommon.conf(https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration.html), and if it is it should querykeyboxd(no idea how, sorry) for the keys, instead of rummaging around in the filesystem itself.Relevant log output
Other information
No response