Cannot deploy to Jenkins Artifactory

150 views
Skip to first unread message

Martin Reinhardt

unread,
Nov 12, 2016, 9:16:54 AM11/12/16
to Jenkins Developers
I'm trying to deploy snapshots of my plugin (https://github.com/jenkinsci/rocketchatnotifier-plugin) to Artifactory, but always getting 401 errors:


[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ rocketchatnotifier ---
Downloading: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/maven-metadata.xml
Downloaded: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/maven-metadata.xml (769 B at 0.6 KB/sec)
Uploading: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/rocketchatnotifier-0.2.2-20161112.135149-2.hpi
Uploading: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/rocketchatnotifier-0.2.2-20161112.135149-2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.366 s
[INFO] Finished at: 2016-11-12T14:51:55+01:00
[INFO] Final Memory: 50M/874M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project rocketchatnotifier: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:rocketchatnotifier:hpi:0.2.2-20161112.135149-2 from/to maven.jenkins-ci.org (https://repo.jenkins-ci.org/snapshots/): Failed to transfer file: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/rocketchatnotifier-0.2.2-20161112.135149-2.hpi. Return code is: 401, ReasonPhrase: 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

I added the server id to my settings.xml and the credentials. I can manual deploy via https://repo.jenkins-ci.org/webapp/.

Any idea's what I'm doing wrong?

Rachel Moreno

unread,
Nov 15, 2016, 3:53:04 PM11/15/16
to Jenkins Developers
Hi Martin,

What do you mean when you say "my settings.xml"? Is that file used by Jenkins?

I hope be useful.

Best regards,
Rachel

Robert Sandell

unread,
Nov 16, 2016, 6:39:42 AM11/16/16
to jenkin...@googlegroups.com
There does not seem to be any permissions configured for that plugin
https://github.com/jenkins-infra/repository-permissions-updater/tree/master/permissions

/B

--
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-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a0c73b9c-b26f-4f82-83c3-a4658f9083b4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Daniel Beck

unread,
Nov 16, 2016, 9:08:32 AM11/16/16
to jenkin...@googlegroups.com

> On 16.11.2016, at 12:39, Robert Sandell <rsan...@cloudbees.com> wrote:
>
> There does not seem to be any permissions configured for that plugin
> https://github.com/jenkins-infra/repository-permissions-updater/tree/master/permissions

In fact, there are:
https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-rocketchatnotifier.yml

Also, please note that 401 Unauthorized ≠ 403 Forbidden.

Martin Reinhardt

unread,
Nov 18, 2016, 8:10:09 AM11/18/16
to Jenkins Developers, m...@beckweb.net
I tried also adding my jenkins-ci credentials to setting.xml:


    <server>
      <id>repo.jenkins-ci.org</id>
      <privateKey>${user.home}/.ssh/id_dsa</privateKey>
      <username>mreinhardt</username>
      <password>...</password>
    </server>

Did I need to encrypt my password or can I use cleartext?

And because I have a different github username, as mentioned here https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Releasingtojenkinsci.org

I do the following
eval "$(ssh-agent -s)"
mvn deploy

But still getting 401. What I'm doing wrong?

Martin Reinhardt

unread,
Nov 18, 2016, 8:27:20 AM11/18/16
to Jenkins Developers, m...@beckweb.net
Reply all
Reply to author
Forward
0 new messages