I’m trying to get my maven build to sign the artifacts it produces. I have the ‘maven-gpg-plugin’ working fine locally, but on travis-ci, it appears the gpg-agent does not support using “–pinentry-mode loopback” option. Here’s the CI build error:
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ nexus-format-archetype ---
gpg: setting pinentry mode 'loopback' failed: Not supported
gpg: signing failed: Inappropriate ioctl for device
gpg: signing failed: Inappropriate ioctl for device
The ‘maven-gpg-plugin’ is configured to send the key passphrase like so:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<gpgArgument>--pinentry-mode</gpgArgument>
<gpgArgument>loopback</gpgArgument>
</gpgArguments>
</configuration>
</plugin>
FWIW, I made sure the various gpg keys are imported from env vars and successfully loaded into the travis gpg db.
I stumbled about trying to reconfigure the gpg-agent to support --pinentry, but failed. Any idea how I can get this working on Travis? Thanks!