[ 
https://issues.apache.org/jira/browse/MGPG-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Tim updated MGPG-113:
-------------------------
    Summary: Upgrading from 3.1.0 to 3.2.1 with no other changes causes 
"gpg:sign-and-deploy-file" failed: 401 Unauthorized  (was: Upgrading from 3.1.0 
to 3.2.1 with no other changes causes "gpg:sign-and-deploy-file failed: 401 
Unauthorized)

> Upgrading from 3.1.0 to 3.2.1 with no other changes causes 
> "gpg:sign-and-deploy-file" failed: 401 Unauthorized
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MGPG-113
>                 URL: https://issues.apache.org/jira/browse/MGPG-113
>             Project: Maven GPG Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>         Environment: ubuntu-22.04 (Ubuntu 22.04 LTS) image
>            Reporter: Tim Tim
>            Priority: Major
>
> 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]*
>  
>  
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to