Publishing plugin leads to 401

45 views
Skip to first unread message

Philipp Straubinger

unread,
Mar 2, 2022, 7:44:48 AM3/2/22
to jenkin...@googlegroups.com
Hi,

I am trying to publish/deploy my first plugin to Jenkins Artifactory
manually, but I am always getting a 401 Unauthorized back.

Plugin: Gamekins (https://github.com/jenkinsci/gamekins-plugin)
Artifactory user: straubin

I followed the official guideline on how to perform a release manually
(https://www.jenkins.io/doc/developer/publishing/releasing-manually/),
even if it seems a bit outdated (another server id generated by
Artifactory for example).

Here is the error message:

    [INFO] BUILD FAILURE
    [INFO]
------------------------------------------------------------------------
    [INFO] Total time:  01:29 min
    [INFO] Finished at: 2022-03-02T08:49:01+01:00
    [INFO]
------------------------------------------------------------------------
    [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
(default-deploy) on project gamekins: Failed to deploy artifacts: Could
not transfer artifact org.gamekins:gamekins:hpi:0.4.2 from/to
maven.jenkins-ci.org (https://repo.jenkins-ci.org/releases/): Transfer
failed for
https://repo.jenkins-ci.org/releases/org/gamekins/gamekins/0.4.2/gamekins-0.4.2.hpi
401 Unauthorized -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven
with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible
solutions, please read the following articles:
    [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  03:45 min
[INFO] Finished at: 2022-03-02T08:49:01+01:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.5.3:perform
(default-cli) on project gamekins: Maven execution failed, exit code:
'1' -> [Help 1]
[ERROR]

If you need more information, I will be happy to provide it. Thank you
in advance for helping!

Kind regards
Philipp

--
Philipp Straubinger
Research Assistant
Chair of Software Engineering II
Faculty of Computer Science and Mathematics
University of Passau

Room: IM 109
Phone: +49 851 509-4095

Gavin Mogan

unread,
Mar 2, 2022, 1:20:01 PM3/2/22
to Jenkins Developers
So i confirmed https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-gamekins.yml
has the right path (would appreciate a second pair of eyes).
so my guess is that your maven credentials aren't setup right.

You may want to generate your credential information from artifactory,
it'll make sure your password is setup right, and the ids and stuff.

That being said, i have the same server ids as that doc page does, so
I'm curious whats wrong about it, and wonder if that's maybe why your
not authorizations.

I wish there was a maven whoami like there is for npm :(
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3379b402-2282-67b3-bdb0-9277a4409778%40uni-passau.de.

Daniel Beck

unread,
Mar 2, 2022, 4:50:18 PM3/2/22
to jenkin...@googlegroups.com
On Wed, Mar 2, 2022 at 7:19 PM 'Gavin Mogan' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
So i confirmed https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-gamekins.yml
has the right path (would appreciate a second pair of eyes).

That would be 403.
 
so my guess is that your maven credentials aren't setup right.

 

You may want to generate your credential information from artifactory,
it'll make sure your password is setup right, and the ids and stuff.

 
I wish there was a maven whoami like there is for npm :(

'mvn deploy' basically tests credentials, since anyone with an account can deploy snapshots of anything.

Philipp Straubinger

unread,
Mar 3, 2022, 7:43:59 AM3/3/22
to jenkin...@googlegroups.com

Hi,

this is how it looks like in Artifactory after following the documentation:

The generated settings.xml is in the attachments.

Best regards
Philipp

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
settings.xml

Daniel Beck

unread,
Mar 3, 2022, 9:53:47 AM3/3/22
to jenkin...@googlegroups.com
On Thu, Mar 3, 2022 at 1:43 PM Philipp Straubinger <philipp.s...@uni-passau.de> wrote:

Hi,

this is how it looks like in Artifactory after following the documentation:


The generated settings.xml is in the attachments.

Did you take the encrypted password from this file, and set it as your password in your real settings.xml file? If so, do you still get HTTP 401 responses when 'mvn deploy'ing things?

Philipp Straubinger

unread,
Mar 4, 2022, 2:23:13 AM3/4/22
to jenkin...@googlegroups.com

Yes, I took the whole generated settings.xml to ~/.m2/settings.xml

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Gavin McDonald

unread,
Mar 4, 2022, 2:53:24 AM3/4/22
to jenkin...@googlegroups.com
Hi

Perthaps try



Daniel Beck

unread,
Mar 4, 2022, 3:14:50 AM3/4/22
to jenkin...@googlegroups.com
On Fri, Mar 4, 2022 at 8:23 AM Philipp Straubinger <philipp.s...@uni-passau.de> wrote:

Yes, I took the whole generated settings.xml to ~/.m2/settings.xml


That's wrong. Try doing what the instructions I link to say. 
Reply all
Reply to author
Forward
0 new messages