【发布时间】:2019-08-06 14:41:37
【问题描述】:
我已经正确配置了 GPG,并且 MAVEN 也引用了正确的 KEY。这一直有效。现在一些Maven总是给出以下错误:
gpg: skipped "39619BDF": No secret key
gpg: signing failed: No secret key
(我不确定是否与使用JDK11而不是JDK 8有关)
Maven settings.xml 有:
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>xxxxxxxxx</gpg.passphrase>
<gpg.keyname>39619BDF</gpg.keyname>
</properties>
</profile>
</profiles>
命令gpg2 --edit-key 39619BDF显示:
gpg (GnuPG) 2.0.29; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
pub 2048R/39619BDF created: 2016-01-27 expires: never usage: SC
trust: ultimate validity: ultimate
sub 2048R/9AE84F82 created: 2016-01-27 expires: never usage: E
[ultimate] (1). Miguel Gamboa (Miguel Gamboa works at CC.ISEL.IPL.PT) <miguelgamboa@outlook.com>
我唯一注意到的是缺少消息 Secret key is available,因为它出现在 Maven 文档中:https://central.sonatype.org/pages/working-with-pgp-signatures.html#dealing-with-expired-keys
【问题讨论】:
标签: maven gnupg maven-central maven-gpg-plugin