You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpg: signing failed: Inappropriate ioctl for device #83
name: Deploy the SNAPSHOT version to Maven Center
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checkout source code
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure GPG Key
run: |
mkdir -p ~/.gnupg/
printf "$MAVEN_GPG_PRIVATE_KEY" | base64 --decode > ~/.gnupg/private.key
gpg --batch --import ~/.gnupg/private.key
env:
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
# Install Java 1.8
- name: Install Java
uses: actions/setup-java@master
with:
java-version: 1.8
server-id: hengyu
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
#gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
#gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn -B package --file pom.xml
# Publish to Apache Maven Central
- name: Publish to Apache Maven Central
run: mvn deploy
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTER_USER_NAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTER_PASSWORD }}
#MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Hello @hengboy ,
As stated in #43 and #91, all you have to do to solve the ioctl issue is to add this configuration to Maven GPG plugin in your POM.
Also, you don't need your 'Configure GPG Key' step since this action now deals with it.
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@bjansen for help with providing solution and related links.
GPG_PRIVATE_KEY I exported with gpg --armor --export-secret-keys
All I ever get is "Error: The process '/usr/bin/gpg' failed with exit code 2" no matter how I twist and turn this
Activity
hengboy commentedon Jul 24, 2020
If remove Configure GPG Key step,logs:
bissim commentedon Aug 14, 2020
Hello @hengboy ,
As stated in #43 and #91, all you have to do to solve the
ioctlissue is to add this configuration to Maven GPG plugin in your POM.Also, you don't need your 'Configure GPG Key' step since this action now deals with it.
bjansen commentedon Feb 2, 2021
Link is broken, FTR here's the piece of configuration to add to the Maven GPG plugin:
dmitry-shibanov commentedon Feb 15, 2021
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 @bjansen for help with providing solution and related links.
Stromner commentedon Mar 6, 2021
My noggin can't get this to work for one of my project, I have added the config above and my gpg plugin in the pom looks like this:
And my gpg workflow step like this:
GPG_PRIVATE_KEY I exported with gpg --armor --export-secret-keys
All I ever get is "Error: The process '/usr/bin/gpg' failed with exit code 2" no matter how I twist and turn this
bessonm commentedon Apr 22, 2021
@Stromner
Did you try not using an env variable for the GPG_PRIVATE_KEY ?
Like so :
Stromner commentedon Apr 22, 2021
Ah thanks! That did the work :)
build: config gpg sign plugin
rahman6848 commentedon Mar 25, 2022
This is working
Thanks @bessonm
fix: Inappropriate ioctl for device error: actions/setup-java#83