0

我正在按照此处列出的所有说明将我的项目发布到 sonatype 存储库:https ://dzone.com/articles/publish-your-artifacts-to-maven-central 但在签署工件期间仍然出现以下错误

[INFO] --- maven-gpg-plugin:3.0.1:sign (sign-artifacts) @ exceptionless-client ---
gpg: skipped "0x9d0e3e1d": No secret key
gpg: signing failed: No secret key
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  42.750 s
[INFO] Finished at: 2021-08-03T10:52:18+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign (sign-artifacts) on project exceptionless-client: Exit code: 2 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please rezad the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我可以在运行gpg --list-key命令时看到列出的密钥。

4

1 回答 1

0

我使用 git bash 生成新密钥,但我不知道 git bash 还附带一个捆绑gpg程序并且它正在使用它。但是,他们maven-gpg-plugin试图使用安装在C:/Program Files(x86). 在我使用它创建密钥后,我安装了它,它运行良好。

于 2021-08-03T05:48:51.387 回答