scapegoat-scala / scapegoat

Scala compiler plugin for static code analysis
Apache License 2.0
516 stars 88 forks source link

Run sbt ci-release failure #851

Open mccartney opened 1 week ago

mccartney commented 1 week ago

Context: https://github.com/scapegoat-scala/scapegoat/pull/848#issuecomment-2188766917

Symptoms: https://github.com/scapegoat-scala/scapegoat/actions/runs/9525951458/job/26637201869 has failed with:

[warn] Ignored unknown package option FixedTimestamp(Some(1262304000000))
[info] Wrote /home/runner/work/scapegoat/scapegoat/target/scala-2.12.18/scalac-scapegoat-plugin_2.12.18-2.1.6+5-d67c7737-SNAPSHOT.pom
[error] java.net.ProtocolException: Server redirected too many  times (20)
[error]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[error]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error]     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[error]     at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1952)
[error]     at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:19[47](https://github.com/scapegoat-scala/scapegoat/actions/runs/9525951458/job/26637201869#step:8:48))
[error]     at java.security.AccessController.doPrivileged(Native Method)
[error]     at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1946)
[error]     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1516)
[error]     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1500)
[error]     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
[error]     at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:288)

... redacted for brevity

FYI @saeltz

mccartney commented 1 week ago

https://github.com/sbt/sbt-pgp/issues/182#issuecomment-727572511 hints that this is a Sonatype credential issue.

Which reminds me of my recent problems with releasing an unrelated Maven/Java package. And there it turned out I should no longer use my username + password as credentials to Sonatype, but I should rather generate an Access Token (long-lived).

Therefore: @sksamuel could you please:

  1. login to https://oss.sonatype.org/
  2. Go to Profile
  3. Pull down User Token
  4. Access User Token
  5. Put these credentials into secrets in this Github repo? SONATYPE_PASSWORD + SONATYPE_USERNAME

(Likely you will need to do the same for other repos of yours)

saeltz commented 19 hours ago

@sksamuel, quick reminder that this blocks us from releasing.