Skip to content

[MGPG-113] Upgrading from 3.1.0 to 3.2.1 with no other changes causes "gpg:sign-and-deploy-file" failed: 401 Unauthorized #252

@jira-importer

Description

@jira-importer

Tim Tim opened MGPG-113 and commented

After upgrading to Maven GPG plugin from 3.1.0 to 3.2.0/3.2.1, the deploy command "{}gpg:sign-and-deploy-file{} " failed with the message "Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:{}3.2.1:{}sign-and-deploy-file : 401 Unauthorized"

 

NOTE: 3.1.0 and below version of gpg:sign-and-deploy-file works well for below CLI

 

Deploy CLI with plugin gpg:sign-and-deploy-file


mvn -B -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 \

-s utils/settings.xml gpg:sign-and-deploy-file -Dgpg.passphrase=xxx \

-Durl=[*https://oss.sonatype.org/service/local/staging/deploy/maven2*](https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Foss.sonatype.org%2Fservice%2Flocal%2Fstaging%2Fdeploy%2Fmaven2&data=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478125085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Rlst6EEorq8QFEyvFrypYO5KOOw1Qrtr5hJigYlaxKg%3D&reserved=0) -DrepositoryId=ossrh \

-DgrouId=com.nvidia -DartifactId=test -Dversion=0.1.0 -Dfile=test.jar

 

 

SONATYPE_USR/PSW defined as env, utils/settings.xml as below


<settings xsi:schemaLocation=[http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd](https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FSETTINGS%2F1.1.0%2520http%3A%2Fmaven.apache.org%2Fxsd%2Fsettings-1.1.0.xsd&data=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478130933%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=AwpWIvI2UECpcvWcFD16CHlYCEjRPYgyXuHW07LbQ7M%3D&reserved=0) xmlns=[http://maven.apache.org/SETTINGS/1.1.0](https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FSETTINGS%2F1.1.0&data=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478137093%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=5985h8YTeXELVjevO0BRSih2SMD8NQeAJnbiBmSEjMI%3D&reserved=0)          xmlns:xsi=[http://www.w3.org/2001/XMLSchema-instance](https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478142757%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=o0V%2Flpv4yqHaYZPv4etTINHsQIzU09ZQAV2vBDjvz%2BE%3D&reserved=0)>

    <servers>

        <server>

            <id>ossrh</id>

            <username>${env.SONATYPE_USR}</username>

            <password>${env.SONATYPE_PSW}</password>

        </server>

   </servers>

...... </settings>

 

Error Logs

 


*20:03:52* + mvn -B -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 -s utils/settings.xml -Durl=[https://oss.sonatype.org/service/local/staging/deploy/maven2] -DrepositoryId=ossrh org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file -Dgpg.executable=nvsec_sign -DgroupId=com.nvidia -DartifactId=test -Dversion=0.1.0 -Dfile=test.jar *20:03:52* [INFO] Scanning for projects... 

*20:04:15  [INFO] Uploading to ossrh: [https://oss.sonatype.org/service/local/staging/deploy/maven2/com/nvidia/test/0.1.0/test-0.1.0.jar*]

 

*20:04:15  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file (default-cli) on project standalone-pom: Error deploying attached artifacts [com.nvidia:test:jar:0.1.0, com.nvidia:test:pom:0.1.0, com.nvidia:test:jar.asc:0.1.0, com.nvidia:test:pom.asc:0.1.0]: Failed to deploy artifacts: Could not transfer artifact com.nvidia:test:jar:0.1.0 from/to ossrh ([https://oss.sonatype.org/service/local/staging/deploy/maven2):] Transfer failed for [https://oss.sonatype.org/service/local/staging/deploy/maven2/com/nvidia/test/0.1.0/test-0.1.0.jar] 401 Unauthorized -> [Help 1]*

 

 


Affects: 3.2.1

Remote Links:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:majorMajor loss of function

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions