0

Dev environment: Mingw64 that came with Git Bash.

I am trying to sign with 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

After setting GNUPGHOME, the error message:

[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

Janardhan
  • 51
  • 6
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 09 '21 at 14:41

1 Answers1

0

Setting the environmental variable for GNUPGHOME resolves the issue.

export GNUPGHOME=$HOME/.gnupg

Note: Do not use ~ as ~/.gnupg for representing home.


Explanation:

The plugin tried to create the key files in the current directory as we can see by the line

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

which is resolved after pointing out the GNUPGHOME.

Janardhan
  • 51
  • 6