Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is setup-gpg still needed? #194

Closed
ckipp01 opened this issue May 1, 2021 · 5 comments
Closed

Is setup-gpg still needed? #194

ckipp01 opened this issue May 1, 2021 · 5 comments

Comments

@ckipp01
Copy link
Contributor

ckipp01 commented May 1, 2021

I ran into a hiccup that took me a little while to figure out today. I kept hitting on the followinng error message when trying to do a release:

gpg (GnuPG) 1.4.23
gpg: directory `/home/runner/.gnupg' created
gpg: can't open `/usr/local/share/gnupg/options.skel': No such file or directory
gpg: keyring `/home/runner/.gnupg/secring.gpg' created
gpg: keyring `/home/runner/.gnupg/pubring.gpg' created
gpg: key FFFFFFFF: secret key imported
gpg: Total number processed: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
Tag push detected, publishing a stable release
[info] Defining Global / pgpSecretRing
[info] The new value will be used by Global / pgpStaticContext
[info] Reapplying settings...
[info] set current project to scalac-scoverage (in build file:/home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/)
[info] Defining Global / pgpPublicRing
[info] The new value will be used by Global / pgpStaticContext
[info] Reapplying settings...
[info] set current project to scalac-scoverage (in build file:/home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/)
[success] Total time: 0 s, completed May 1, 2021 1:33:55 PM
[success] Total time: 0 s, completed May 1, 2021 1:33:56 PM
[info] Setting Scala version to 2.12.10 on 4 projects.
[info] Reapplying settings...
[info] set current project to scalac-scoverage (in build file:/home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/)
[warn] Binary version (2.13) for dependency org.scala-lang#scala-compiler;2.13.5
[warn] 	in org.scoverage#scalac-scoverage-runtime_2.12.10;1.4.4 differs from Scala binary version in project (2.12).
[info] Wrote /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-runtime/jvm/target/scala-2.12.10/scalac-scoverage-runtime_2.12.10-1.4.4.pom
[warn] Binary version (2.13) for dependency org.scala-lang#scala-compiler;2.13.5
[warn] 	in org.scoverage#scalac-scoverage-runtime_sjs1_2.12.10;1.4.4 differs from Scala binary version in project (2.12).
[info] Wrote /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-runtime/js/target/scala-2.12.10/scalac-scoverage-runtime_sjs1_2.12.10-1.4.4.pom
[warn] Binary version (2.13) for dependency org.scala-lang#scala-compiler;2.13.5
[warn] 	in org.scoverage#scalac-scoverage_2.12;1.4.4 differs from Scala binary version in project (2.12).
[warn] Binary version (2.13) for dependency org.scala-lang#scala-compiler;2.13.5
[warn] 	in org.scoverage#scalac-scoverage-plugin_2.12.10;1.4.4 differs from Scala binary version in project (2.12).
[info] Wrote /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-plugin/target/scala-2.12.10/scalac-scoverage-plugin_2.12.10-1.4.4.pom
[info] Main Scala API documentation to /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-runtime/js/target/scala-2.12.10/api...
[info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.10. Compiling...
[info] compiling 9 Scala sources to /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-runtime/js/target/scala-2.12.10/classes ...
[info]   Compilation completed in 11.212s.
model contains 19 documentable templates
[info] done compiling
[info] Main Scala API documentation to /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-runtime/jvm/target/scala-2.12.10/api...
model contains 4 documentable templates
[info] Main Scala API documentation successful.
[info] compiling 2 Scala sources to /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-runtime/jvm/target/scala-2.12.10/classes ...
[info] Main Scala API documentation successful.
[info] Main Scala API documentation to /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-plugin/target/scala-2.12.10/api...
[info] done compiling
[info] compiling 16 Scala sources to /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-plugin/target/scala-2.12.10/classes ...
model contains 47 documentable templates
[info] Main Scala API documentation successful.
[info] gpg: error checking usability status of FFFFFFFF
[info] gpg: key FFFFFFFF: secret key without public key - skipped
[info] gpg: no default secret key: secret key not available
[info] gpg: signing failed: secret key not available
[info] gpg: error checking usability status of FFFFFFFF
[info] gpg: key FFFFFFFF: secret key without public key - skipped
[info] gpg: no default secret key: secret key not available
[info] gpg: signing failed: secret key not available
[info] done compiling
[info] gpg: error checking usability status of FFFFFFFF
[info] gpg: key FFFFFFFF: secret key without public key - skipped
[info] gpg: no default secret key: secret key not available
[info] gpg: signing failed: secret key not available
[error] java.lang.RuntimeException: Failure running 'gpg --batch --passphrase *** --detach-sign --armor --use-agent --output /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-plugin/target/scala-2.12.10/scalac-scoverage-plugin_2.12.10-1.4.4.pom.asc /home/runner/work/scalac-scoverage-plugin/scalac-scoverage-plugin/scalac-scoverage-plugin/target/scala-2.12.10/scalac-scoverage-plugin_2.12.10-1.4.4.pom'.  Exit code: 2
[error] 	at scala.sys.package$.error(package.scala:30)
[error] 	at com.jsuereth.sbtpgp.CommandLineGpgSigner.sign(PgpSigner.scala:74)
[error] 	at com.jsuereth.sbtpgp.PgpSettings$.$anonfun$signingSettings$2(PgpSettings.scala:151)
[error] 	at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:293)
[error] 	at scala.collection.immutable.Map$Map4.foreach(Map.scala:492)
[error] 	at scala.collection.TraversableLike.flatMap(TraversableLike.scala:293)
[error] 	at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:290)
[error] 	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
[error] 	at com.jsuereth.sbtpgp.PgpSettings$.$anonfun$signingSettings$1(PgpSettings.scala:146)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

There also seems to be similar errors reported in a few other issues:
- #173 (comment)
- #172
- #170

While some of them had different solutions one of them hinted at removing sbt-gpg, which caused me to try that, which finally worked for me and allowed for my release to work: https://github.com/scoverage/scalac-scoverage-plugin/actions/runs/802328069

I see that there was a pr to remove setup-pgp here, but I also see there is a commit later where you added it back in here.

I'm a bit confused as I have some projects that seem to require it, and then others that don't. Do you have any info on when this may or may not be required? I'll gladly expand the README if there is more info about this, but I'm a bit unsure if it's actually needed and when it may be needed.

@alexarchambault
Copy link
Collaborator

If that can help, running this script instead of the setup-gpg action works fine for me. (@regadas initially added it to the coursier/apps repository, I've been copying it from there to many of my repos since.)

@olafurpg
Copy link
Member

olafurpg commented May 1, 2021

You can remove setup-gpg. It’s no longer needed with the latest sbt-ci-release.

@ckipp01
Copy link
Contributor Author

ckipp01 commented May 1, 2021

You can remove setup-gpg. It’s no longer needed with the latest sbt-ci-release.

Should I send in a pr to remove it from this repo then? Because the instructions include a step that copies the release file from this repo which still includes it.

https://github.com/olafurpg/sbt-ci-release#github-actions

@olafurpg
Copy link
Member

olafurpg commented May 1, 2021

Yeah, that would be great. I had assumed setup-gpg didn’t cause issues with releases so I didn’t make an active effort to deprecate it yet. I’ll follow up and archive the repo with appropriate docs.

ckipp01 added a commit to ckipp01/sbt-ci-release that referenced this issue May 2, 2021
This seems to be sometimes causing problems with the newest version of
sbt-ci-release. Following up on the conversation in
sbt#194 I'm removing this
since there is a step in the docs that copies this release.yml.
@ckipp01
Copy link
Contributor Author

ckipp01 commented May 2, 2021

Closed via #195 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants