gpg: signing failed
Trying to setup Jenkins to sign artifacts with the maven-gpg-plugin to allow me to deploy to the Sonatype OSS Nexus. However I was getting the error:
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ parent ---
gpg: signing failed: No such file or directory
Choon-Chern Lim suggests adding --pinentry-mode loopback to fix this.
    
        --pinentry-mode
        loopback
    
Which then brought me to the error:
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ parent ---
gpg: signing failed: Inappropriate ioctl for device
Which led me to actually read the gpg man page. Where I found the option --batch.
–batch
–no-batch
Use batch mode. Never ask, do not allow interactive commands. –no-batch disables this option. Note that even with a filename given on the command line, gpg might still need to read from STDIN (in particular if gpg figures that the input is a detached signature and no data file has been specified). Thus if you do not want to feed data via STDIN, you should connect STDIN to oq/dev/nullcq.
My next iteration of maven-gpg-plugin config is now:
    org.apache.maven.plugins
    maven-gpg-plugin
    1.6
    
        
            sign-artifacts
            verify
            
                sign
            
            
                
                    --batch
                    --pinentry-mode
                    loopback