Skip to content

Commit

Permalink
#153 Fix "gpg: signing failed: No such file or directory" error
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-asprino committed Nov 27, 2023
1 parent d8eb7b8 commit 042d4f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish_to_mvn-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
run: |
echo -e "Releasing ${{ github.ref_name }}"
echo -e "$(tty)"
gpg --version
# This avoids gpg: signing failed: Inappropriate ioctl for device error
# See https://github.com/keybase/keybase-issues/issues/2798
# export GPG_TTY=$(tty)
export GPG_TTY=`tty`
export GPG_TTY=$(tty)
# export GPG_TTY=`tty`
# https://gist.github.com/sualeh/ae78dc16123899d7942bc38baba5203c
echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
Expand Down
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<maven.compiler.target>11</maven.compiler.target>
<jena.version>4.7.0</jena.version>
<revision>0.9.0-SNAPSHOT</revision>
<gpg.keyname>lgu.spree</gpg.keyname>
</properties>

<licenses>
Expand Down Expand Up @@ -72,6 +73,10 @@
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>


Expand Down Expand Up @@ -241,6 +246,14 @@
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<!--passphraseServerId>${gpg.keyname}</passphraseServerId-->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit 042d4f0

Please sign in to comment.