GeezerVison is showing github.com — [MGPG-84] signing fails in eclipse when using gpg-agent · Issue #232 · apache/maven-gpg-plugin
[MGPG-84] signing fails in eclipse when using gpg-agent #232
Labels
bugSomething isn't working Description
Piotr Morgwai Kotarbinski opened MGPG-84 and commented
after update from 1.6 to 3.0.1 signing started to fail when running maven from eclipse with the following message:
gpg: signing failed: No pinentry
When running from terminal, everything works ok.
Furthermore, after running from terminal, it also works ok in eclipse for about 1 minute. After about 1 minute it starts to fail again with the same error.
System info:
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
openjdk 11.0.11 2021-04-20
gpg (GnuPG) 2.2.4
Eclipse 2021-12 and 2021-03
ubuntu-18.04 amd64
$ echo $GPG_AGENT_INFO
/run/user/1000/gnupg/S.gpg-agent:0:1
Affects: 3.0.1
Issue Links:
- MGPG-90 Signing fails with 3.0.1: "no pinentry"
Activity
jira-importer commented on Dec 15, 2021
Michael Osipov commented
Eclipse's terminal is not a fully functional terminal. That is why this like carriage return does not really work. I guess this is the same issue here. I guess gpg uses isatty() which fails here.
jira-importer commented on Dec 15, 2021
Piotr Morgwai Kotarbinski commented
Michael Osipov while this may be related, please note that it used to work perfectly ok in version 1.6 of the plugin. So there must have been at least some change in the plugin itself that trigger gpg to perform actions it didn't perform before.
jira-importer commented on Dec 15, 2021
Michael Osipov commented
morgwai, since you exactly know that it worked before I would recommend to bisect down to the causing commit.
jira-importer commented on Jul 28, 2022
Konrad Windszus commented
Same for me with regular terminal on Mac OS with
gpg (GnuPG/MacGPG2) 2.2.34 used during release:perform
. It says:
gpg: signing failed: No pinentry
in case the private key requires a passphrase which has not yet been entered/stored in the keychain.
My workaround
call echo "test" | gpg --clearsign on the terminal before which asks for the passphrase properly and then save into the Mac OS keychain.
I assume that either the forked Maven process is not properly connected to the terminal or somehow calls gpg-maven-plugin in non-interactive mode.
jira-importer commented on May 3, 2023
Hervé Boutemy commented
on the use case with maven-release-plugin, see MRELEASE-1114
on the use case with Eclipse, I suppose it's another topic... thanks Konrad for the workaround :)
Metadata
Metadata
bugSomething isn't working Development
No branches or pull requestsIssue actions