unable to perform jenkins release through local machine

81 views
Skip to first unread message

Mohammad Jameel Uddin

unread,
Oct 15, 2021, 5:15:37 AM10/15/21
to jenkin...@googlegroups.com
Hi All,

I want to release the Jenkins plugin through local machine, but while performing "mvn release:perform" through command line it says unauthorized error 401. I tried many things to fix this but didn't work. can you help me in fixing this?.
I am attaching the pom.xml file and ~/.m2/settings.xml file.

settings.xml

<?xml version="1.0" encoding="UTF-8"?>

<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.2.0"

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

<servers>

    <server>

      <username>puneetchelani_sauce</username>

      <password>AP4MWfjX1ktFw8tcTyTqgJcraJ9</password>

      <id>central</id>

    </server>

    <server>

      <username>puneetchelani_sauce</username>

      <password>AP4MWfjX1ktFw8tcTyTqgJcraJ9</password>

      <id>snapshots</id>

    </server>

  </servers>

  <profiles>

    <profile>

      <repositories>

        <repository>

          <snapshots>

            <enabled>false</enabled>

          </snapshots>

          <id>central</id>

          <name>remote-snapshot-repos</name>

          <url>https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos</url>

        </repository>

        <repository>

          <snapshots />

          <id>snapshots</id>

          <name>remote-snapshot-repos</name>

          <url>https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos</url>

        </repository>

      </repositories>

      <pluginRepositories>

        <pluginRepository>

          <snapshots>

            <enabled>false</enabled>

          </snapshots>

          <id>central</id>

          <name>remote-snapshot-repos</name>

          <url>https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos</url>

        </pluginRepository>

        <pluginRepository>

          <snapshots />

          <id>snapshots</id>

          <name>remote-snapshot-repos</name>

          <url>https://repo.jenkins-ci.org/artifactory/remote-snapshot-repos</url>

        </pluginRepository>

      </pluginRepositories>

      <id>artifactory</id>

    </profile>

  </profiles>

  <activeProfiles>

    <activeProfile>artifactory</activeProfile>

  </activeProfiles>

</settings>


Jamie Tanna

unread,
Oct 15, 2021, 5:19:36 AM10/15/21
to jenkin...@googlegroups.com
Can you please immediately change your password? You shouldn't share even the encrypted form below

--
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/CAAx0H6xkTTXw7PP0RHOmY8L1KKVz3Zg4QHhp%2BRtQoxLxcMnMAQ%40mail.gmail.com.

Mohammad Jameel Uddin

unread,
Oct 15, 2021, 5:34:17 AM10/15/21
to jenkin...@googlegroups.com
just now changed the password

Thanks & Regards,
Md Jameel Uddin

Gavin Mogan

unread,
Oct 15, 2021, 5:43:35 AM10/15/21
to Jenkins Developers
What was the exact version you tried to upload? The output of the perform step should have the URLs it's trying to upload to

Mohammad Jameel Uddin

unread,
Oct 15, 2021, 5:50:00 AM10/15/21
to Jenkins Developers
Not sure,  which version you are asking about, if it is a release version then it is 1.10.

Installing /Users/saucelabs/Desktop/autonomiq-plugin/target/checkout/target/autonomiq.hpi to /Users/saucelabs/.m2/repository/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10.hpi    [INFO] Installing /Users/saucelabs/Desktop/autonomiq-plugin/target/checkout/pom.xml to /Users/saucelabs/.m2/repository/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10.pom 

   [INFO] Installing /Users/saucelabs/Desktop/autonomiq-plugin/target/checkout/target/autonomiq.jar to /Users/saucelabs/.m2/repository/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10.jar    [INFO] Installing /Users/saucelabs/Desktop/autonomiq-plugin/target/checkout/target/autonomiq-sources.jar to /Users/saucelabs/.m2/repository/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10-sources.jar   

  [INFO] Installing /Users/saucelabs/Desktop/autonomiq-plugin/target/checkout/target/autonomiq-javadoc.jar to /Users/saucelabs/.m2/repository/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10-javadoc.jar

    [INFO] 

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

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/releases/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10.hpi

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/releases/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10.pom



for more information, please see the attached screenshot

Screenshot 2021-10-15 at 2.52.29 PM.png

Mark Waite

unread,
Oct 15, 2021, 5:55:58 AM10/15/21
to jenkinsci-dev
I think that you're missing a configuration in your settings.xml file for the Jenkins artifact repository.  I have the following section in my settings.xml:

  <servers>
    <server>
      <id>maven.jenkins-ci.org</id>
      <username>MarkEWaite</username>
      <!-- See https://www.jenkins.io/doc/developer/publishing/releasing-manually/#artifactory-credentials-for-maven -->
      <password>...encrypted and encoded secret stuff here...</password>
    </server>
  </servers>

As far as I can see from the file you posted, you only have server sections for 'central' and 'snapshots'.

Mohammad Jameel Uddin

unread,
Oct 15, 2021, 6:21:55 AM10/15/21
to jenkin...@googlegroups.com
I added one more section in my settings.xml:

<servers>

    <server>

      <username>puneetchelani_sauce</username>

      <password>password</password>

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

    </server>

    <server>

      <username>puneetchelani_sauce</username>

      <password>password</password>

      <id>central</id>

    </server>

    <server>

      <username>puneetchelani_sauce</username>

      <password>password</password>

      <id>snapshots</id>

    </server>

  </servers>


Got 403 error, [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project autonomiq: Failed to deploy artifacts: Could not transfer artifact io.jenkins.plugins:autonomiq:hpi:1.10 from/to maven.jenkins-ci.org (https://repo.jenkins-ci.org/releases/): Authorization failed for https://repo.jenkins-ci.org/releases/io/jenkins/plugins/autonomiq/1.10/autonomiq-1.10.hpi 403 Forbidden -> [Help 1]


pom.xml file : https://github.com/jenkinsci/autonomiq-plugin/blob/main/pom.xml


i could log in to repo.jenkins-ci.org with my credentials, and i have permission to upload files https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-autonomiq.yml


Mark Waite

unread,
Oct 15, 2021, 6:49:21 AM10/15/21
to jenkinsci-dev
I believe that the pom.xml file for the plugin declares that the plugin will be uploaded to " io.jenkins.plugins" but the repository permissions updater repository says that you are granted permissions for "org.jenkins-ci.plugins.autonomiq".  Those are different locations as far as I understand.

If you remove line 10 from pom.xml I believe that will upload the plugin to the location where you have permission.

Tim Jacomb

unread,
Oct 15, 2021, 7:08:09 AM10/15/21
to jenkin...@googlegroups.com
Or update the permission file with the correct path…

Mohammad Jameel Uddin

unread,
Oct 15, 2021, 8:40:34 AM10/15/21
to jenkin...@googlegroups.com
updated the permission file path to "io/jenkins/plugins/autonomiq", but still getting same 403 error.


Mohammad Jameel Uddin

unread,
Oct 15, 2021, 9:08:54 AM10/15/21
to Jenkins Developers
Thanks a lot guys, i was able to perform "mvn release:perform" step successfully, what's the next step inorder to show the plugin in the market place(https://plugins.jenkins.io/)?

Mark Waite

unread,
Oct 15, 2021, 10:29:55 AM10/15/21
to Jenkins Developers
New plugin releases usually appear on https://updates.jenkins.io/latest/ within 10-15 minutes of their release.  It is updated multiple times per hour.

The plugins site is regenerated multiple times per day by reading from locations like https://updates.jenkins.io/latest/.  It should be visible on plugins.jenkins.io within 24 hours and is often visible within 12 hours.

Mohammad Jameel Uddin

unread,
Oct 19, 2021, 7:14:52 AM10/19/21
to Jenkins Developers
I am able to see the release plugin on https://plugins.jenkins.io/autonomiq/#ipsec-documentation. but not on plugin manager under the available plugin tab. (Manage Jenkins ----> go to plugin manager ----> available)

what should I do to see my plugin(autonomiq plugin) on the available plugins tab?

Daniel Beck

unread,
Oct 19, 2021, 7:19:45 AM10/19/21
to JenkinsCI Developers
It should be there. Make sure it's not installed and that you're using Jenkins 2.303.1 or newer.

Mark Waite

unread,
Oct 19, 2021, 10:11:42 AM10/19/21
to Jenkins Developers
I see it visible on ci.jenkins.io under the Available tab.
screencapture-ci-jenkins-io-pluginManager-available-2021-10-19-08_10_26.png
Reply all
Reply to author
Forward
0 new messages