Skip to content

ci: send Central credentials again under Maven 3.10 - #339

Merged
devopvoid merged 1 commit into
mainfrom
fix/snapshot-credential-scope
Oct 10, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/snapshot-credential-scope

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

The Deploy snapshot job on main has failed with HTTP Status: 401 from central.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:

[WARNING] Not using credentials of server 'central' for repository https://central.sonatype.com/repository/maven-snapshots/: the origins declared for this id are [https://repo.maven.apache.org]. ... or set maven.repository.credentialScope=id to restore legacy id-only credential matching.

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=id to the deploy in .github/actions/publish/action.yml. Both build.yml (snapshots) and release.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.

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.
@devopvoid
devopvoid merged commit 7c04c4a into main Oct 10, 2026
22 checks passed
@devopvoid
devopvoid deleted the fix/snapshot-credential-scope branch October 10, 2026 11:52
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

Successfully merging this pull request may close these issues.

1 participant