question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gpg: signing failed: Inappropriate ioctl for device

See original GitHub issue

I encountered a problem like the title.

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 }}

plugin config in pom.xml

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-gpg-plugin</artifactId>
    <version>${maven.gpg.plugin.version}</version>
    <executions>
        <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
                <goal>sign</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
dmitry-shibanovcommented, 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.

3reactions
bjansencommented, Feb 2, 2021

Link is broken, FTR here’s the piece of configuration to add to the Maven GPG plugin:

            <configuration>
              <!-- Prevent gpg from using pinentry programs -->
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
Read more comments on GitHub >

github_iconTop Results From Across the Web

gpg: signing failed: Inappropriate ioctl for device #2798 - GitHub
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen: gpg: signing failed: Inappropriate ...
Read more >
"gpg: signing failed: Inappropriate ioctl for device" on MacOS ...
I have added. GPG_TTY=$(tty) export GPG_TTY. to my ~/.bash_profile file. Now it is working.
Read more >
T3716 gpg: signing failed: Inappropriate ioctl for device for ...
I agree that gpg-agent is by default started, but it doesn't call pinentry by default after enigmail's request for the PGP encryption/signing process,...
Read more >
GPG fails to sign commit, error : Inappropriate ioctl for device
Created new GPG key pair, added to gitconfig and then tried again to sign the commit. Re-installed pinentry and its b-menu and d-menu...
Read more >
Fixing GPG "Inappropriate ioctl for device" errors - Daniel15
The error occurs because GnuPG 2.1 by default ignores passphrases passed in via environment variables or stdin, and is trying to show a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found