Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-1114

Broken interaction of maven-gpg-plugin with Gpg4win Kleopatra since 3.0.0-M6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M6, 3.0.0-M7, 3.0.0
    • 3.0.1
    • None
    • None

    Description

      Before https://github.com/apache/maven-release/pull/125, when gpg-plugin runs, it triggered the cert password prompt window of Kleopatra but now it fails right away with no pinentry.

      [INFO] [INFO] --- gpg:3.0.1:sign (sign-release-artifacts) @ mrelease-1114 ---
      [INFO] gpg: signing failed: No pinentry
      [INFO] gpg: signing failed: No pinentry
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] BUILD FAILURE
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time:  1.130 s
      [INFO] [INFO] Finished at: 2023-05-03T02:47:31+02:00
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign (sign-release-artifacts) on project mrelease-1114: Exit code: 2 -> [Help 1]
      [INFO] [ERROR] 
      [INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [INFO] [ERROR] 
      [INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  3.622 s
      [INFO] Finished at: 2023-05-03T02:54:16+02:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0:perform (default-cli) on project mrelease-1114: Maven execution failed, exit code: 1 -> [Help 1]
      

      See also https://github.com/apache/maven-release/pull/125#issuecomment-1160398620 and the following comments.

      WORKAROUND

      init the GPG agent:

      • with Maven: mvn gpg:sign
      • or more basically in pure shell: echo "test" | gpg --clearsign

      then you can run mvn release:perform again and it will be successful (it's perfectly supported by maven-release-plugin to retry the perform step)

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              famod Falko Modler
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: