gpt4 book ai didi

jenkins - 在Jenkins下运行时,maven-gpg-plugin失败,出现 “Inappropriate ioctl for device”

转载 作者:行者123 更新时间:2023-12-01 22:58:44 26 4
gpt4 key购买 nike

当Jenkins在远程Linux Shell中触发maven-gpg-plugin时,它将失败并显示gpg: signing failed: Inappropriate ioctl for device。这一直有效直到最近。我不知道发生了什么变化。

我在网上找到了很多建议使用export GPG_TTY=$(tty)的引用文献,但这不适用于ssh连接,因为ttynull。有任何想法吗?

最佳答案

我在https://myshittycode.com/2017/08/07/maven-gpg-plugin-prevent-signing-prompt-or-gpg-signing-failed-no-such-file-or-directory-error/上找到了很好的解释

如果页面出现问题,我将重新发布帖子的要点:

If you 1) initially had it working in the past, and 2) have tried all sorts of solutions from the web, and still couldn’t get it working, chances are you have unconsciously upgraded GPG version from 2.0 to 2.1.



听起来不错...

To fix this, GPG 2.1 requires --pinentry-mode to be set to loopback in order to pick up gpg.passphrase value defined in Maven settings.xml.

So, update Maven GPG Plugin configuration in pom.xml to the following:


<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>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>

关于jenkins - 在Jenkins下运行时,maven-gpg-plugin失败,出现 “Inappropriate ioctl for device”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53992950/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com