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
If user has multiple keys and the imported one isn't the default one (which is often the case in my opinion) the signing process will failed with not very helpful message:
[info] gpg: signing failed: Bad passphrase
[info] gpg: signing failed: Bad passphrase
[error] stack trace is suppressed; run last rules2_11 / signedArtifacts for the full output
[error] (rules2_11 / signedArtifacts) Failure running 'gpg --batch --pinentry-mode loopback --passphrase ... --detach-sign --armor --use-agent --output /home/kghost/workspace/scalafix-unified/rules/target/jvm-2.11/unified_2.11-0.0.2+3-29124f7a+20220206-1145-SNAPSHOT.pom.asc /home/kghost/workspace/scalafix-unified/rules/target/jvm-2.11/unified_2.11-0.0.2+3-29124f7a+20220206-1145-SNAPSHOT.pom'. Exit code: 2
[error] Total time: 5 s, completed Feb 6, 2022, 11:45:06 AM
After carefully inspecting the gpg command we might notice that there is no information about which key to use.
If user has multiple keys and the imported one isn't the default one (which is often the case in my opinion) the signing process will failed with not very helpful message:
After carefully inspecting the gpg command we might notice that there is no information about which key to use.
sbt-pgp
exposesusePgpKeyHex
method to explicitly set key which will be used to perform operations. https://github.com/sbt/sbt-pgp#configuration-signing-keyI think that it should be possible to obtain key_id during the process and set it somewhere among the lines: https://github.com/sbt/sbt-ci-release/blob/main/plugin/src/main/scala/com/geirsson/CiReleasePlugin.scala#L143
Otherwise, please consider adding some note to the readme with the link to relevant section in the
sbt-pgp
.The text was updated successfully, but these errors were encountered: