'ArtifactoryDeploy Step failing- User -***** not permitted to deploy

I am using jenkins with Gradle (6.0.1) and trying to deploy my artifacts. However the build is failing with error:-

15:27:48 * What went wrong: 15:27:48 Execution failed for task ':artifactoryDeploy'. 15:27:48 > java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.io.IOException: JFrog service failed. Received 403: { 15:27:48 "errors" : [ { 15:27:48 "status" : 403, 15:27:48 "message" : "The user: **** is not permitted to deploy 'xx-xx/2.0.6/xx-xx.jar' into 'mvn-public-local:xx-xx/2.0.6/xx-xx.jar'." 15:27:48 } ] 15:27:48 }

When I checked the mvn-public-local I saw that the xx-xx.jar was deployed. Checked user-name and password and they are working fine.



Solution 1:[1]

Based on the error snippet shared "The user is not permitted to deploy" which will occur when the user you are trying to deploy the artifact does not have the Deploy permission. Further, you can provide the required privileges for the user by creating a Permission Target at the Artifactory application end and then re-trigger the build. You can refer to our wiki page here for more details on the Permission Target.

As you can see the JAR file exists in the mvn-public-local repository, please do validate whether this JAR has been deployed by the build user and during the same time of build execution?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pavan Gonugunta