Skip to content

Fix Maven Central publish signing in release workflow#4

Merged
nitisht merged 2 commits into
mainfrom
copilot/fix-publish-to-maven-central-again
Jun 19, 2026
Merged

Fix Maven Central publish signing in release workflow#4
nitisht merged 2 commits into
mainfrom
copilot/fix-publish-to-maven-central-again

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The Publish to Maven Central GitHub Actions job was failing during artifact signing because GPG was invoked in interactive pinentry mode. This change aligns the Maven/GPG configuration with non-interactive CI execution.

  • Root cause

    • The release job imported the private key successfully, but maven-gpg-plugin still called gpg without loopback pinentry.
    • In GitHub Actions this caused gpg: signing failed: No pinentry during deploy.
  • Build configuration

    • Configure maven-gpg-plugin to pass loopback pinentry arguments to GPG:
      • --pinentry-mode
      • loopback
  • Release workflow

    • Pass the signing passphrase via MAVEN_GPG_PASSPHRASE in the publish step instead of GPG_PASSPHRASE.
    • This matches the Maven GPG plugin’s batch-mode convention for non-interactive signing.
  • Result

    • Keeps Maven Central publishing behavior unchanged outside CI.
    • Removes the interactive pinentry requirement from the release path.
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-gpg-plugin</artifactId>
  <version>3.2.7</version>
  <configuration>
    <gpgArguments>
      <arg>--pinentry-mode</arg>
      <arg>loopback</arg>
    </gpgArguments>
  </configuration>
</plugin>

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'Publish to Maven Central' Fix Maven Central publish signing in release workflow Jun 19, 2026
Copilot AI requested a review from nitisht June 19, 2026 09:51
@nitisht nitisht marked this pull request as ready for review June 19, 2026 10:17
@nitisht nitisht merged commit 4523150 into main Jun 19, 2026
4 checks passed
@nitisht nitisht deleted the copilot/fix-publish-to-maven-central-again branch June 19, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants