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
java.lang.NullPointerException: Cannot invoke "org.bouncycastle.openpgp.PGPPrivateKey.getKeyID()" because "<parameter2>" is null
at org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder.build(Unknown Source)
at org.bouncycastle.openpgp.PGPSignatureGenerator.init(Unknown Source)
at io.spring.github.actions.artifactorydeploy.openpgp.ArmoredAsciiSigner.getSignatureGenerator(ArmoredAsciiSigner.java:193)
at io.spring.github.actions.artifactorydeploy.openpgp.ArmoredAsciiSigner.sign(ArmoredAsciiSigner.java:186)
at io.spring.github.actions.artifactorydeploy.openpgp.ArmoredAsciiSigner.sign(ArmoredAsciiSigner.java:175)
at io.spring.github.actions.artifactorydeploy.openpgp.ArmoredAsciiSigner.sign(ArmoredAsciiSigner.java:161)
at io.spring.github.actions.artifactorydeploy.openpgp.ArmoredAsciiSigner.sign(ArmoredAsciiSigner.java:138)
at io.spring.github.actions.artifactorydeploy.openpgp.ArmoredAsciiSignerTests.getWithStringSigningKeyWhenSigningKeyIsKeyReturnsSigner(ArmoredAsciiSignerTests.java:85)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
The root cause is this returning
null
:artifactory-deploy-action/src/main/java/io/spring/github/actions/artifactorydeploy/openpgp/ArmoredAsciiSigner.java
Line 113 in b106e28
The
null
result is then passed into the constructor ofPGPSignatureGenerator
:artifactory-deploy-action/src/main/java/io/spring/github/actions/artifactorydeploy/openpgp/ArmoredAsciiSigner.java
Line 193 in b106e28
Doing so triggers the NPE. We should probably fail fast when
extractPrivateKey
returnsnull
so that the cause of the problem is more clear.The text was updated successfully, but these errors were encountered: