Reputation: 953
I want to publish a new version of my functional logger in Scala ("Flog"). The changes to the code are relatively minor. I've upgraded some dependencies, including to Scala 2.13.16. I haven't changed any of the publishing configuration files. I'm running sbt version 1.9.9 with the following plugins:
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
Java version is: openjdk 23 2024-09-17
Here is the output that I receive when I run sbt in a terminal window (I've replaced my home directory with ).
[info] welcome to sbt 1.9.9 (Homebrew Java 23)
[info] loading settings for project global-plugins from gpg.sbt,idea.sbt ...
[info] loading global plugins from <home>/.sbt/1.0/plugins
[info] loading settings for project flog-build from plugins.sbt ...
[info] loading project definition from <home>/IdeaProjects/Flog/project
[info] loading settings for project flog from build.sbt,publish.sbt ...
[info] set current project to flog (in build file:<home>/IdeaProjects/Flog/)
[warn] there are 3 keys that are not used by any other settings/tasks:
[warn]
[warn] * ThisBuild / organization
[warn] +- <home>/IdeaProjects/Flog/publish.sbt:1
[warn] * ThisBuild / pomIncludeRepository
[warn] +- <home>/IdeaProjects/Flog/publish.sbt:27
[warn] * ThisBuild / publishMavenStyle
[warn] +- <home>/IdeaProjects/Flog/publish.sbt:33
[warn]
[warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key
[info] sbt server started at local://<home>/.sbt/1.0/server/91203c874e932486daf6/sock
[info] started sbt server
sbt:flog> publishSigned
[info] Wrote <home>/IdeaProjects/Flog/target/scala-2.13/flog_2.13-1.0.10.pom
[info] compiling 3 Scala sources to <home>/IdeaProjects/Flog/target/scala-2.13/classes ...
[info] Main Scala API documentation to <home>/IdeaProjects/Flog/target/scala-2.13/api...
[info] Main Scala API documentation successful.
[warn] versionScheme setting is empty; set `ThisBuild / versionScheme := Some("early-semver")`, `Some("semver-spec")` or `Some("pvp")`
[warn] so tooling can use it for eviction errors etc - https://www.scala-sbt.org/1.x/docs/Publishing.html
[info] gpg: using "F......3" as default secret key for signing
[info] gpg: using "F......3" as default secret key for signing
[info] gpg: using "F......3" as default secret key for signing
[info] gpg: using "F......3" as default secret key for signing
[error] stack trace is suppressed; run last publishSigned for the full output
[error] (publishSigned) java.net.ProtocolException: Server redirected too many times (20)
[error] Total time: 11 s, completed Jan 19, 2025, 9:58:59 AM
sbt:flog> last publishSigned
[debug] CLIENT ERROR: Content access is protected by token url=https://oss.sonatype.org/service/local/staging/deploy/maven2/com/phasmidsoftware/flog_2.13/1.0.10/flog_2.13-1.0.10-javadoc.jar.asc
[error] java.net.ProtocolException: Server redirected too many times (20)
[error] at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
...
...
I know there are some warnings here but I don't really think they are causing the crash. There is no problem with the gpg commands--they are working fine, I believe (certainly I can do signing outside of sbt).
It appears that there is a problem with "my" directory at oss.sonatype.org but what that problem is I can't easily tell.
Upvotes: 0
Views: 36
Reputation: 953
Closing this question with an easily discovered answer (not my own). See comment by @Gaël J:
Sonatype changed the way to authenticate a few months ago. You need to use a toke now. See central.sonatype.org/news/20240617_migration_of_accounts and central.sonatype.org/publish/generate-token
Upvotes: 1