passphraseServerId appears not to be set (or is different to the default)
See original GitHub issueDescription: When using the maven-gpg-plugin during publishing of an artifact the action fails with:
[INFO] gpg: Sorry, no terminal at all requested - can't get input
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
I’ve seen issue #91 and the config snippet is included as listed there and in the project’s README. I had to manually set:
<passphraseServerId>gpg.passphrase</passphraseServerId>
Which as far as I understand should be the default.
Task version: v1
Platform:
- [x ] Ubuntu
- macOS
- Windows
Runner type:
- [ x] Hosted
- Self-hosted
Repro steps:
Use the plugin like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
Notice <passphraseServerId>gpg.passphrase</passphraseServerId>
is not included.
In a subsequent step run:
- name: Publish
run: |
git config --global user.email "github-action@hypi.io"
git config --global user.name "Hypi Github Action"
mvn -e -B -DscmCommentPrefix="[skip ci]" -DpushChanges=false release:prepare && \
mvn -e -B -DscmCommentPrefix="[skip ci]" -DpushChanges=false release:perform -DlocalCheckout=true
Expected behavior:
mvn release:{prepare,perform} should work without having to set passphraseServerId
to the default value.
Actual behavior:
passphraseServerId
must be set to gpg.passphrase
in pom.xml
for the release to succeed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Avoid gpg signing prompt when using Maven release plugin
Just set it up in a profile in settings.xml and activate it by default: <settings> <profiles> <profile> <id>gpg</id> <properties> ...
Read more >Usage - Apache Maven GPG Plugin
Usage. Sign artifacts with GnuPG. Signs all of a project's attached artifacts with GnuPG. You need to have previously configured the default key ......
Read more >Publish a Java Project to the Maven Central Repository - Foojay
This guide will describe how to publish the JDesk framework to Maven Central. The project is written in Java using Maven as the...
Read more >Coverage Report - org.codehaus.mojo.rpm.AbstractRPMMojo
"License"); you may not use this file except in compliance ... Any other value (such as <tt>x86_64</tt>) will set the architecture of the...
Read more >Open Source Used In AppDynamics_Cloud_Monitoring 3040
licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apparently you also need to specify the key to be used by
maven-gpg-plugin
with thekeyname
configuration.Personally, I ended up just choosing to use the sign-maven-plugin instead of the
maven-gpg-plugin
Just in case anyone else stumbles across this discussion looking for an answer to
gpg: Sorry, no terminal at all requested - can't get input
: in my case the problem simply was an outdated maven-gpg-plugin. The README works perfectly well for me now.