Unable to perform plugin release to repo.jenkins-ci.org

247 views
Skip to first unread message

Tyler Camp

unread,
May 22, 2020, 1:30:33 PM5/22/20
to Jenkins Developers

I’m attempting to release the latest Code Dx plugin (https://github.com/jenkinsci/codedx-plugin) but am getting HTTP 401 responses when running `mvn release:perform`. Parent POM is latest at 4.2, and I have my maven settings at `C:/Users/algor/.m2/settings.xml` containing:

 

<settings xmlns="https://maven.apache.org/SETTINGS/1.0.0"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="https://maven.apache.org/SETTINGS/1.0.0

                      https://maven.apache.org/xsd/settings-1.0.0.xsd">

 

  <servers>

    <server>

      <id>maven.jenkins-ci.org</id>

      <username>tylercamp</username>

      <password>REDACTED-ENCRYPTED-PASSWORD</password>

    </server>

  </servers>

 

</settings>

 

Encrypted password was pulled from https://repo.jenkins-ci.org/webapp/#/profile . My account was registered with `jenkins-infrra/repository-permissions-updater` repo: https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-codedx.yml

 

Relevant log lines:

 

    [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ codedx ---

    Uploading to repo.jenkins-ci.org: https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/codedx/3.0.0/codedx-3.0.0.hpi

    Uploading to repo.jenkins-ci.org: https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/codedx/3.0.0/codedx-3.0.0.pom

    [INFO] ------------------------------------------------------------------------

    [INFO] BUILD FAILURE

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time:  23.104 s

    [INFO] Finished at: 2020-05-22T13:09:05-04:00

    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project codedx: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:codedx:hpi:3.0.0 from/to repo.jenkins-ci.org (https://repo.jenkins-ci.org/releases): Transfer failed for https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/codedx/3.0.0/codedx-3.0.0.hpi 401 Unauthorized -> [Help 1]

    [ERROR]

 

Let me know if there’s more information I should attach for troubleshooting this. Any help appreciated.

Slide

unread,
May 22, 2020, 5:11:17 PM5/22/20
to jenkin...@googlegroups.com
Can you take a quick look at this page and make sure you have everything covered?  https://www.jenkins.io/doc/developer/publishing/releasing/. Have you released before?

--
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/2166ff20-524a-40ab-9b31-928b407f1f83%40googlegroups.com.


--

Tyler Camp

unread,
May 22, 2020, 7:01:04 PM5/22/20
to Jenkins Developers
Yes, I've double-checked everything on that list before posting here. This is my first time performing a release.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkin...@googlegroups.com.

Slide

unread,
May 22, 2020, 7:06:16 PM5/22/20
to jenkin...@googlegroups.com
I think you need to follow this howto for getting the correct encrypted password for the settings.xml.  https://www.roytuts.com/encrypt-user-passwords-in-maven-settings/




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/d9ee0d80-d4c1-41f4-a8f0-be82e4eb05fd%40googlegroups.com.


--

Tyler Camp

unread,
May 22, 2020, 7:15:22 PM5/22/20
to Jenkins Developers
I just did a system reset so I'll try that later, though if your instructions do fix the issue then jenkins documentation is incorrect: "Log in to Artifactory, and from your profile, obtain the encrypted password."

Mez Pahlan

unread,
May 23, 2020, 3:13:31 AM5/23/20
to Jenkins Developers
>though if your instructions do fix the issue then jenkins documentation is incorrect: "Log in to Artifactory, and from your profile, obtain the encrypted password."

I've recently changed laptops and have had to re setup my environment and obtained the encrypted password correctly using these instructions so they are not incorrect.

I don't doubt you have an issue but could you list the steps you took one by one when you logged into Artifactory to when you pasted in your password to your settings for.

For the record I've also successfully done it the other way that is described in the alternate link by setting up a Maven master password that locally encrypts your password as opposed to getting the pre encrypted password from the server.

Daniel Beck

unread,
May 23, 2020, 3:27:39 AM5/23/20
to Jenkins Developers
If your plugin overrides the distributionManagement, as in

https://github.com/jenkinsci/codedx-plugin/blob/d56180188ae138677f09214f57c1b8d840375477/pom.xml#L70-L75

our instructions no longer apply.

In this case, it is named 'repo.jenkins-ci.org', not the default 'maven.jenkins-ci.org', so the credentials need to be changed to apply to the same server ID.

Although the real fix is to rip out this nonsense from the pom.xml.


> On 22. May 2020, at 19:21, Tyler Camp <tylermat...@gmail.com> wrote:
>
>

Tyler Camp

unread,
May 26, 2020, 10:32:46 AM5/26/20
to Jenkins Developers
Mez and slide, the password provided by artifactory did end up working. I tried the encryption method that you mentioned, slide, and got a password significantly different from artifactory that did not work.

Thank you for your suggestion Daniel, after making that change (leftover from very old pom) and restarting the release process I was able to deploy our release using the encrypted artifactory password.

Slide

unread,
May 26, 2020, 12:13:34 PM5/26/20
to jenkin...@googlegroups.com
Great, glad things are working for you. I haven't used the method with Artifactory, so I didn't know if it worked or not :) 

--
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/7eae5673-f8eb-4bb5-b5f4-442b0dc4b7d6%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages