Skip to content

Publishing is broken #4179

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

Closed
jackkoenig opened this issue Jun 15, 2024 · 2 comments
Closed

Publishing is broken #4179

jackkoenig opened this issue Jun 15, 2024 · 2 comments

Comments

@jackkoenig
Copy link
Contributor

Starting yesterday, the publishing of SNAPSHOTs is failing with:

[error] java.net.ProtocolException: Server redirected too many  times (20)
[error]         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error]         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[error]         at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error]         at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[error]         at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[error]         at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:2051)
[error]         at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:2046)
[error]         at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
[error]         at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:2045)
[error]         at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1609)
[error]         at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
[error]         at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
[error]         at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:288)
[error]         at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error]         at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error]         at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error]         at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:407)

I don't yet know what the issue is, but poking around I found scala/scala-dev#783 (comment) and sbt/sbt-pgp#182. It seems that this is a way that incorrect credentials can manifest. I don't think the credentials are wrong as we have been using them for a long time. It is possible that someone at CHIPS Alliance changed something about the login account. I am still able to log in to https://s01.oss.sonatype.org so it doesn't seem like this is the actual cause, but I will reach out to CHIPS Alliance to check.

@jackkoenig
Copy link
Contributor Author

firtool-resolver (which uses mill for publishing but also publishes to the chips alliance organization) is also failing1, but with a slightly different message:

firtool-resolver[2.12].publishSigned java.lang.RuntimeException: Failed to publish firtool-resolver_2.12 to Sonatype. Errors: 
Code: 401, message: 
...
Code: 401, message: 
    mill.scalalib.publish.SonatypePublisher.reportPublishResults(SonatypePublisher.scala:178)
    mill.scalalib.publish.SonatypePublisher.publishToUri(SonatypePublisher.scala:123)

Code 401 is an "unauthorized response" which means there's an issue with the credentials: https://www.sonatype.com/blog/2010/11/what-to-do-when-sonatype-nexus-returns-401.

So this is almost certainly an issue with our credentials.

Footnotes

  1. https://github.com/chipsalliance/firtool-resolver/actions/runs/9530021083/job/26269442038

@jackkoenig
Copy link
Contributor Author

I reached out to Sonatype support, they very promptly let me know that you now have to publish with user tokens as described on this page: https://central.sonatype.org/publish/generate-token/

I have fixed the secrets on this repo to use the token and publishing is working again!

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

1 participant