0

开发环境: Git Bash 附带的 Mingw64。

我正在尝试签名maven-gpg-plugin

 [INFO] --- maven-gpg-plugin:1.6:sign (sign-release-artifacts) @ systemds ---
[INFO] gpg: keybox 'F:\Repo\systemds/pubring.kbx' created
[INFO] gpg: can't connect to the agent: Invalid value passed to IPC
[INFO] gpg: no default secret key: No secret key
[INFO] gpg: signing failed: No secret key

设置后GNUPGHOME,报错信息:

[INFO] [INFO] --- maven-gpg-plugin:1.6:sign (sign-release-artifacts) @ systemds ---
[INFO] gpg: can't connect to the agent: Invalid value passed to IPC
[INFO] gpg: can't connect to the agent: Invalid value passed to IPC
[INFO] gpg: keydb_search failed: No agent running
[INFO] gpg: no default secret key: No agent running
[INFO] gpg: signing failed: No agent running

4

1 回答 1

0

设置环境变量为GNUPGHOME解决问题。

export GNUPGHOME=$HOME/.gnupg

注意:不要用~as~/.gnupg代表家。


解释:

该插件试图在当前目录中创建密钥文件,我们可以通过该行看到

[INFO] gpg: keybox 'F:\Repo\systemds/pubring.kbx' created

指出后解决GNUPGHOME

于 2021-11-10T07:08:11.893 回答