Skip to content

sonatypeBundleRelease erroring out with HttpClientException: [401: Unauthorized] #224

@MrPowers

Description

@MrPowers

Thanks for creating this great project.

The ; + publishSigned; sonatypeBundleRelease command was working in February 2021, but is broken now. Suppose it could be related to this issue.

Here's the project build.sbt file.

Here's the full stack trace, thanks for the help!

~/D/c/m/bebe ❯❯❯ sbt
[info] welcome to sbt 1.4.3 (AdoptOpenJDK Java 1.8.0_272)
[info] loading global plugins from /Users/powers/.sbt/1.0/plugins
[info] loading settings for project bebe-build from plugins.sbt ...
[info] loading project definition from /Users/powers/Documents/code/my_apps/bebe/project
[info] loading settings for project bebe from build.sbt ...
[info] set current project to bebe (in build file:/Users/powers/Documents/code/my_apps/bebe/)
[info] sbt server started at local:///Users/powers/.sbt/1.0/server/95f89f2f7690db247a04/sock
[info] started sbt server
sbt:bebe> ; + publishSigned; sonatypeBundleRelease
[info] Setting Scala version to 2.12.12 on 1 projects.
[info] Reapplying settings...
[info] set current project to bebe (in build file:/Users/powers/Documents/code/my_apps/bebe/)
[info] Wrote /Users/powers/Documents/code/my_apps/bebe/target/scala-2.12/bebe_2.12-0.0.2.pom
[info] Main Scala API documentation to /Users/powers/Documents/code/my_apps/bebe/target/scala-2.12/api...
[info] compiling 2 Scala sources to /Users/powers/Documents/code/my_apps/bebe/target/scala-2.12/classes ...
model contains 9 documentable templates
[info] Main Scala API documentation successful.
[info]  published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2.pom.asc
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2.pomcts 10s
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2-sources.jar
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2.jarcts 10s
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2.jar.asc10s
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2-javadoc.jar.asc
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2-sources.jar.asc
[info] 	published bebe_2.12 to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part/bebe_2.12-0.0.2-javadoc.jar
[info] 	publish commited: moved /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2.part ebe / signedArtifacts 10s
[info] 		to /Users/powers/Documents/code/my_apps/bebe/target/sonatype-staging/0.0.2/com/github/mrpowers/bebe_2.12/0.0.2
[success] Total time: 18 s, completed Apr 2, 2021 10:41:46 AM
[info] Reapplying settings...
[info] set current project to bebe (in build file:/Users/powers/Documents/code/my_apps/bebe/)
2021-04-02 10:41:46.797-0300  info [SonatypeService] sonatypeRepository  : https://oss.sonatype.org/service/local  - (SonatypeService.scala:24)
2021-04-02 10:41:46.799-0300  info [SonatypeService] sonatypeProfileName : com.github.mrpowers  - (SonatypeService.scala:25)
[info] Preparing a new staging repository for [sbt-sonatype] bebe 0.0.2
2021-04-02 10:41:46.801-0300  info [SonatypeClient] Reading staging repository profiles...  - (SonatypeClient.scala:109)
2021-04-02 10:41:47.795-0300  info [SonatypeClient] Reading staging profiles...  - (SonatypeClient.scala:121)
2021-04-02 10:41:48.334-0300 error [Sonatype] 
wvlet.airframe.http.HttpClientException: [401: Unauthorized]
	at wvlet.airframe.http.HttpClientException$.requestFailure(HttpClientException.scala:67)
	at wvlet.airframe.http.HttpClientException$.classifyHttpResponse(HttpClientException.scala:110)
	at wvlet.airframe.http.HttpClient$.$anonfun$defaultHttpClientRetry$1(HttpClient.scala:382)
	at wvlet.airframe.control.Retry$RetryContext.runInternal(Retry.scala:269)
	at wvlet.airframe.control.Retry$RetryContext.runWithContext(Retry.scala:257)
	at wvlet.airframe.http.client.URLConnectionClient.send(URLConnectionClient.scala:63)
	at wvlet.airframe.http.client.URLConnectionClient.get(URLConnectionClient.scala:159)
	at xerial.sbt.sonatype.SonatypeClient.stagingRepositoryProfiles(SonatypeClient.scala:111)
	at xerial.sbt.sonatype.SonatypeService.stagingRepositoryProfiles(SonatypeService.scala:114)
	at xerial.sbt.sonatype.SonatypeService.findStagingRepositoryProfilesWithKey(SonatypeService.scala:108)
	at xerial.sbt.sonatype.SonatypeService.dropIfExistsByKey(SonatypeService.scala:95)
	at xerial.sbt.Sonatype$.$anonfun$prepare$2(Sonatype.scala:142)
	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
	at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
	at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
	at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)  - (Sonatype.scala:409)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions