Use GPG private key within GitHub Actions and Setup Java SDK
See original GitHub issueAssociated community ticket: https://github.community/t/use-gpg-private-key-within-github-actions-and-setup-java-sdk/127133
The customer is trying to publish his Java package to the Maven Central Repository and GitHub Packages in a GitHub Actions workflow. He is authenticating with the GPG key to publish the package.
He refers to the examples mentioned in “Publishing Java packages with Maven” and the README of the setup-java
action to setup the workflow.
But he gets the following errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project ***: Unable to decrypt gpg passphrase: org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException: java.io.FileNotFoundException: /home/runner/.m2/settings-security.xml (No such file or directory) -> [Help 1]
OR
gpg: signing failed: Inappropriate ioctl for device
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top GitHub Comments
As per @AirQuick answer in #43, the problem is to configure Maven GPG plugin by inserting this snippet:
Again, thank you @BrightRan for your concern, this issue can be closed.
On a side note: @konradpabjan @jaredpetersen please properly document this mandatory configuration.
Hello, everyone. I’m closing this issue, because documentation was updated in terms of this pull request. If you have any concerns feel free to reopen the issue. Thanks @bissim @royi-frontegg for help with resolving the issue.