Skip to content

Fix SNAPSHOT publish failing 403 on develop/main pushes #223

Description

@kirich1409

Every push to develop/main triggers publish.yml's publish job, which runs publishToMavenCentral with a -SNAPSHOT version. It fails with:

Could not PUT '.../repository/maven-snapshots/dev/androidbroadcast/featured/featured-bom/1.0.0-SNAPSHOT/...pom'. Received status code 403 from server: Forbidden
Task :featured-bom:publishMavenPublicationToMavenCentralRepository FAILED

Root cause: SNAPSHOT deployment is not enabled for the dev.androidbroadcast namespace on the new Central Portal (central.sonatype.com). The real release (version 1.0.0, staging endpoint) is unaffected — only the SNAPSHOT branch builds fail.

Why this matters (priority): a Publish check that is red on every push trains maintainers to ignore it, so the next real publish failure will hide in the same red.

Fix options:

  • (a) Gate publishToMavenCentral off branch pushes — only run it for release tags (or only publish snapshots when explicitly enabled).
  • (b) Enable snapshot deployment for the namespace on Central Portal and verify credentials/secrets.

Reference failed runs: 26701975087, 26694180198.

Metadata

Metadata

Assignees

No one assigned

    Labels

    publishingMaven Central / release infrastructure

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions