Repository navigation
ci: send Central credentials again under Maven 3.10 - #339
Merged
Merged
Conversation
The ubuntu-22.04 runner image moved to Maven 3.10.0, which only sends a server's credentials to the origins of the repository with that id. Our server id is "central", the id of Maven Central itself, so the token was withheld from central.sonatype.com and the snapshot deploy failed with HTTP 401. maven.repository.credentialScope=id restores id-only matching.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Deploy snapshot job on main has failed with
HTTP Status: 401fromcentral.sonatype.com/repository/maven-snapshots/since 2026-10-09 (runs 38002767748, 38003091871). The last good deploy was on 2026-10-05.Cause
The ubuntu-22.04 runner image moved from 20260927 to 20261004, which updated Maven from 3.9.16 to 3.10.0. Maven 3.10 only sends a server's credentials to the address of the repository with the same id. Our server id is
central, which is also the id of Maven Central itself (repo.maven.apache.org). So the token was withheld from central.sonatype.com, as the job log says:The Central publishing limits enforced since 2026-10-01 are not the cause, since deploys still succeeded on Oct 4 and 5.
Change
Pass
-Dmaven.repository.credentialScope=idto the deploy in.github/actions/publish/action.yml. Bothbuild.yml(snapshots) andrelease.yml(releases) use that action, so both are covered.Verification
This can only be verified by a deploy on main. The local Maven is 3.9.12, so the failure can't be reproduced here.