Nexus-Jenkins-Plugin 403-Forbidden error (2.13.0 OSS)

529 views
Skip to first unread message

Karthik

unread,
Feb 5, 2018, 9:59:16 AM2/5/18
to Nexus Users
I was trying to use  Nexus-Jenkins-Plugin to promote the artifacts into release repo, I'm getting  <title>403 - Forbidden</title> ERROR and User have the following permissions with create and update privileges.



But When I provide Admin access to the user, It was able to deploy. 

Thanks,
karthik



Damian Bradicich

unread,
Feb 5, 2018, 10:19:37 AM2/5/18
to Nexus Users
There is also a privilege directly related to promotion, You should have 6 privileges like so:

Staging: All Profiles (*)
Staging: All Profiles (drop)
Staging: All Profiles (finish)
Staging: All Profiles (promote)
Staging: All Profiles (read)
Staging: All Profiles (stage)

So I figure just giving your user the promote privilege I noted, should suffice

Damian

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/69881906-a8d9-4078-89db-55ab8df1f76f%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Damian Bradicich

unread,
Feb 5, 2018, 10:30:07 AM2/5/18
to Nexus Users
Alternatively, if i misread your mail and you aren't trying to promote to a release repo using staging ;) ... the privileges you have assigned definitely seem more than enough to write anything to any maven repository.  It would be worth turning on the debug logs and trying the request from jenkins again, see if anything jumps out.

Damian

Karthik

unread,
Feb 5, 2018, 11:03:27 AM2/5/18
to Nexus Users
You are right we are not trying to promote to a release repo using staging. Here is a debug log

com.sonatype.nexus.api.exception.RepositoryManagerException: Unable to upload component: Forbidden <html>
10:32:21   <head>
10:32:21     <title>403 - Forbidden</title>
10:32:21     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
10:32:21 
10:32:21     <link rel="icon" type="image/png" href="http://***********:8082/nexus/favicon.png">
10:32:21     <!--[if IE]>
10:32:21     <link rel="SHORTCUT ICON" href="http://***********:8082/nexus/favicon.ico"/>
10:32:21     <![endif]-->
10:32:21 
10:32:21     <link rel="stylesheet" href="http://************:8082/nexus/static/css/Sonatype-content.css?2.13.0-01" type="text/css" media="screen" title="no title" charset="utf-8">
10:32:21   </head>
10:32:21   <body>
10:32:21     <h1>403 - Forbidden</h1>
10:32:21     <p>Forbidden</p>
10:32:21   </body>
10:32:21 </html>
10:32:21 
10:32:21 at com.sonatype.nexus.api.db.a(SourceFile:37)
10:32:21 at com.sonatype.nexus.api.df.a(SourceFile:73)
10:32:21 at com.sonatype.nexus.api.df.a(SourceFile:46)
10:32:21 at com.sonatype.nexus.api.df.uploadComponent(SourceFile:27)
10:32:21 at com.sonatype.nexus.api.dc.uploadComponent(SourceFile:78)
10:32:21 at com.sonatype.nexus.api.repository.RepositoryManagerClient$uploadComponent.call(Unknown Source)
10:32:21 at org.sonatype.nexus.ci.nxrm.ComponentUploader$_uploadComponents_closure2.doCall(ComponentUploader.groovy:93)
10:32:21 Caused: java.io.IOException
10:32:21 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10:32:21 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
10:32:21 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
10:32:21 at java.lang.reflect.Constructor.newInstance(Unknown Source)
10:32:21 at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
10:32:21 at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
10:32:21 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
10:32:21 at org.sonatype.nexus.ci.nxrm.ComponentUploader$_uploadComponents_closure2.doCall(ComponentUploader.groovy:96)
10:32:21 Caused: java.io.IOException: Upload of BMS2WebEar/build/libs/BMS2WebEAR.ear failed
10:32:21 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10:32:21 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
10:32:21 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
10:32:21 at java.lang.reflect.Constructor.newInstance(Unknown Source)
10:32:21 at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
10:32:21 at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
10:32:21 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:255)
10:32:21 at org.sonatype.nexus.ci.nxrm.ComponentUploader$_uploadComponents_closure2.doCall(ComponentUploader.groovy:108)
10:32:21 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:32:21 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
10:32:21 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
10:32:21 at java.lang.reflect.Method.invoke(Unknown Source)
10:32:21 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
10:32:21 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
10:32:21 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
10:32:21 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
10:32:21 at groovy.lang.Closure.call(Closure.java:414)
10:32:21 at groovy.lang.Closure.call(Closure.java:430)
10:32:21 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040)
10:32:21 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025)
10:32:21 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066)
10:32:21 at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
10:32:21 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
10:32:21 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
10:32:21 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
10:32:21 at org.sonatype.nexus.ci.nxrm.ComponentUploader.uploadComponents(ComponentUploader.groovy:77)
10:32:21 at org.sonatype.nexus.ci.nxrm.ComponentUploader$uploadComponents.call(Unknown Source)
10:32:21 at org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep.perform(NexusPublisherBuildStep.groovy:55)
10:32:21 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
10:32:21 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
10:32:21 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
10:32:21 at hudson.model.Build$BuildExecution.build(Build.java:206)
10:32:21 at hudson.model.Build$BuildExecution.doRun(Build.java:163)
10:32:21 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
10:32:21 at hudson.model.Run.execute(Run.java:1724)
10:32:21 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
10:32:21 at hudson.model.ResourceController.execute(ResourceController.java:97)
10:32:21 at hudson.model.Executor.run(Executor.java:421)


On Monday, February 5, 2018 at 10:30:07 AM UTC-5, dbradicich wrote:
Alternatively, if i misread your mail and you aren't trying to promote to a release repo using staging ;) ... the privileges you have assigned definitely seem more than enough to write anything to any maven repository.  It would be worth turning on the debug logs and trying the request from jenkins again, see if anything jumps out.

Damian
On Mon, Feb 5, 2018 at 10:19 AM, Damian Bradicich <dbrad...@sonatype.com> wrote:
There is also a privilege directly related to promotion, You should have 6 privileges like so:

Staging: All Profiles (*)
Staging: All Profiles (drop)
Staging: All Profiles (finish)
Staging: All Profiles (promote)
Staging: All Profiles (read)
Staging: All Profiles (stage)

So I figure just giving your user the promote privilege I noted, should suffice

Damian
On Mon, Feb 5, 2018 at 9:59 AM, Karthik <karthikc...@gmail.com> wrote:
I was trying to use  Nexus-Jenkins-Plugin to promote the artifacts into release repo, I'm getting  <title>403 - Forbidden</title> ERROR and User have the following permissions with create and update privileges.



But When I provide Admin access to the user, It was able to deploy. 

Thanks,
karthik



--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
Reply all
Reply to author
Forward
0 new messages