[
https://issues.apache.org/jira/browse/MGPG-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291588#comment-17291588
]
Frederik Boster commented on MGPG-79:
-------------------------------------
The root cause is that the
[GpgSigner|https://github.com/apache/maven-gpg-plugin/blob/8b1ef753e04cb7d61e280966e18560eb915b8678/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java#L102]
always sets the "pinentry-mode" to "loopback" in case a GPG version >= 2.1 is
being used.
With "pinentry-mode" being set to "loopback" the following behavior can be
observed:
If Maven is being run in "non-interactive" mode and the GPG flag "--no-tty" is
set it simply fails with "gpg: Sorry, no terminal at all requested - can't get
input".
If Maven is being run in "interactive" mode and the GPG flag ""--no-tty" is not
set it spawns an input prompt for the passphrase, which causes the plugin to
hang indefinitely.
I submitted [PR #9|https://github.com/apache/maven-gpg-plugin/pull/9] in an
attempt to fix this issue.
> plugin hangs on first run on Windows Git Bash with Kleopatra
> ------------------------------------------------------------
>
> Key: MGPG-79
> URL: https://issues.apache.org/jira/browse/MGPG-79
> Project: Maven GPG Plugin
> Issue Type: Bug
> Affects Versions: 3.0.0 (cancelled)
> Reporter: Herve Boutemy
> Priority: Major
> Fix For: 3.0.2
>
> Attachments: gpg_jstack.log, procexplr.PNG
>
>
> found during release 3.0.0 vote:
> [https://lists.apache.org/thread.html/r855a3f8d4b161da297191e5a7ce0e7e5be81895e60fe5b7be16cc604%40%3Cdev.maven.apache.org%3E]
> {quote}the plugin simply hangs and does not continue if I use 3.0.0 after
> starting Kleopatra (https://docs.kde.org/stable5/en/pim/kleopatra/).
> When I first use 1.6 of the plugin after starting Kleopatra, the
> password dialog pops up (as ususal), the files are signed *and after
> this I am able to use 3.0.0 just fine!*
> So with 3.0.0 the initial communication with the agent seems to be broken...
> $ mvn -version
> Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
> Maven home: C:\_dev\Maven\latest
> Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: C:\_dev\Java\latest
> Default locale: de_DE, platform encoding: Cp1252
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> $ gpg --version
> gpg (GnuPG) 2.2.19-unknown
> libgcrypt 1.8.5
> Git Bash.{quote}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)