sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.84k stars 557 forks source link

403 Forbidden error on deploy #348

Closed lukehutch closed 4 months ago

lukehutch commented 4 months ago

I get this error when I try to deploy my project:

[INFO] [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.12:deploy (injected-nexus-deploy)
on project classgraph: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.12:deploy
failed: Nexus connection problem to URL [https://s01.oss.sonatype.org/ ]: 403 - Forbidden -> [Help 1]

This worked fine a few weeks ago, and I haven't changed anything.

Here are the relevant sections of my pom.xml:

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

...

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
            </plugin>

...

                <!-- Stage jars on Sonatype Nexus -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
                    </configuration>
                </plugin>

                <!-- Deploy jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <phase>deploy</phase>
                        <goals>deploy</goals>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <!-- Activate release profile -->
                        <releaseProfiles>release</releaseProfiles>
                        <!-- Work around bug where releaseProfiles tag doesn't actually work yet -->
                        <arguments>-Prelease</arguments>
                    </configuration>
                </plugin>
nblair commented 4 months ago

Hi @lukehutch unfortunately this isn't the right place to get the help you need.

This issue tracker is specifically for deployments of Nexus Repository OSS. Per (https://central.sonatype.org/news/20240109_issues_sonatype_org_deprecation/):

Registration and Namespace Requests Users new to publishing via Maven Central will need to register via central.sonatype.com.

Support Requests All other support requests will go through our central-support@sonatype.com email.