GPG plugin reports "No secret key": version 1.5/1.6 - Windows 10 64-bit - gpg (GnuPG) 2.2.20-unknown

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

GPG plugin reports "No secret key": version 1.5/1.6 - Windows 10 64-bit - gpg (GnuPG) 2.2.20-unknown

Qingtian Wang
Hi,

I am very new to gpg and the maven plugin for it. I followed the
instructions here:

https://maven.apache.org/plugins/maven-gpg-plugin/usage.html

and numerous other places online. I always get the following error when
running "mvn deploy" or "mvn verify". I googled and found the version 2.2
of GPG changed how "secring.gpg" is stored. They now combined both
public and secret key rings into the one file called "pubring.kbx". As a
matter of fact, if I type "gpg --list-secret-keys" in CLI, I got
nothing/blank in return. Is the 1.5/1.6 version of the maven-gpg-plugin not
working with 2.2 version of the GPG executable because of the change?

Again I have tried all kinds of instructions in addition to the official
maven plugin doc (e.g. Sonatype.org), and always get the same error below.
Can you please help?

Thanks!

===

[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ mavenproject1 ---
gpg: no default secret key: No secret key
gpg: signing failed: No secret key
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  1.390 s
[INFO] Finished at: 2020-04-21T22:16:39-05:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on
project mavenproject1: Exit code: 2 -> [Help 1]