question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publishing to Sonatype Nexus repository doesn't work in sbt-1.0.0-x

See original GitHub issue

steps

problem

It seems Sonatype credential configuration is not effective, and publish fails with an authentication failure:

sbt:publish-example> publish
[info] Wrote /Users/leo/work/tmp/publish-example/target/scala-2.12/publish-example_2.12-0.1-SNAPSHOT.pom

[error] java.io.IOException: Access to URL https://oss.sonatype.org/content/repositories/snapshots/org/xerial/sbt/publish-example_2.12/0.1-SNAPSHOT/publish-example_2.12-0.1-SNAPSHOT.pom was refused by the server: Unauthorized

[error] 	at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:79)

[error] (*:publish) java.io.IOException: Access to URL https://oss.sonatype.org/content/repositories/snapshots/org/xerial/sbt/publish-example_2.12/0.1-SNAPSHOT/publish-example_2.12-0.1-SNAPSHOT.pom was refused by the server: Unauthorized

[error] Total time: 1 s, completed Jul 17, 2017 1:50:43 PM

expectation

The same configuration works if I use sbt 0.13.x. This is a blocker for releasing https://github.com/xerial/sbt-sonatype for sbt-1.0.0-RC2.

notes

sbt version: 1.0.0-RC2

I found the configuration in ~/.sbt/1.0/*.sbt is loaded (for example, the other key set in this file can be seen in sbt console) but it seems the credential is not used when running publish command.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
eed3si9ncommented, Jul 24, 2017

Fixed in https://github.com/sbt/librarymanagement/pull/141. This will be in next RC.

0reactions
eed3si9ncommented, Jul 22, 2017

Yes. We can’t ship another RC until we fix this bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nexus-repository-publish - Sonatype Community
Hi Wim,. I have replicated this issue. It appears that Bitbucket pipelines don't perform any file globbing or expansion at all. The value...
Read more >
sbt Reference Manual — Using Sonatype
step 5: Publishing. From sbt shell run: > publishSigned. Check the published artifacts in the Nexus Repository Manager (same login as Sonatype's ......
Read more >
sbt: publish to corporate Nexus repository unauthorized
I've got something to work, by using sbt-aether-deploy plugin, which uses Maven infrastructure (wagon) to deploy. Credentials are exactly the same. In fact,...
Read more >
Artifact is not publishing even after successful mvn deploy
I had successfully deployed and published my artifact to oss.sonatype.org nexus repository. From last couple of day , after few changes and ...
Read more >
Nexus3: Publishing with SBT and getting an unauthorized ...
I am working on migrating our code base to publish artifacts to our new Nexus 3 ... [error] Unable to find credentials for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found