# Jenkins plugin cli download wrong plugin version

**URL:** <https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312>\
**Category:** Using Jenkins\
**Created:** [February 7, 2024, 8:20am UTC](https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312 "2024-02-07T08:20:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Letizia](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Letizia](https://community.jenkins.io/u/Letizia)\
**Post date:** [February 7, 2024, 8:20am UTC](https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312/1 "2024-02-07T08:20:36Z")

</div>

I built a jenkins docker image using jenkins-plugin-cli and all works fine.

Now I have to add a new plugin so I modify my plugin.txt and run docker build, but it fail because plugin version downloaded are wrong.

This is the output:

[0me[91mNo directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins  
Using update center [https://updates.jenkins.io/update-center.json](https://updates.jenkins.io/update-center.json) from JENKINS\_UC environment variable  
Using experimental update center [https://updates.jenkins.io/experimental/update-center.json](https://updates.jenkins.io/experimental/update-center.json) from JENKINS\_UC\_EXPERIMENTAL environment variable  
Using incrementals mirror [Index of incrementals/](https://repo.jenkins-ci.org/incrementals) from JENKINS\_INCREMENTALS\_REPO\_MIRROR environment variable  
No CLI option or environment variable set for plugin info, using default of [https://updates.jenkins.io/plugin-versions.json](https://updates.jenkins.io/plugin-versions.json)  
e[0me[91mNo war entered. Will use default of /usr/share/jenkins/jenkins.war  
e[0me[91m  
Retrieving update center information  
e[0me[91mCreated cache at: /var/jenkins\_home/.cache/jenkins-plugin-management-cli  
e[0me[91mUpdate center URL: [https://updates.jenkins.io/update-center.json?version=2.346.3](https://updates.jenkins.io/update-center.json?version=2.346.3)  
e[0me[91mCache miss for: update-center-2.346.3  
e[0me[91mDownloaded update-center-2.346.3 from [https://updates.jenkins.io/dynamic-stable-2.375.1/update-center.json](https://updates.jenkins.io/dynamic-stable-2.375.1/update-center.json) (attempt 1 of 3)  
e[0me[91mCache miss for: experimental-update-center-2.346.3  
e[0me[91mCache miss for: plugin-versions  
e[0me[91mDownloaded plugin-versions from [https://updates.jenkins.io/current/plugin-versions.json](https://updates.jenkins.io/current/plugin-versions.json) (attempt 1 of 3)e[0me[91m

It seems that the list for 2.346.3 version is missing ad it returns the plugin version list about the current version.

If I try to curl [https://updates.jenkins.io/update-center.json?version=2.346.3](https://updates.jenkins.io/update-center.json?version=2.346.3) I get 302 redirect to [https://updates.jenkins.io/dynamic-stable-2.375.1/update-center.json](https://updates.jenkins.io/dynamic-stable-2.375.1/update-center.json).

Is this an error or jenkins version 2.346.3 is no more supported?

Here is my current Jenkins setup:

## Jenkins: 2.346.3 OS: Linux - 3.10.0-1160.99.1.el7.x86\_64 Java: 1.8.0\_345 - Temurin (OpenJDK 64-Bit Server VM)

ace-editor:1.1  
ant:481.v7b\_09e538fcca  
antisamy-markup-formatter:159.v25b\_c67cd35fb\_  
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a\_7b\_a\_e61  
artifactory:3.18.12  
authentication-tokens:1.4  
authorize-project:1.4.0  
bootstrap5-api:5.2.1-3  
bouncycastle-api:2.27  
branch-api:2.1071.v1a\_188a\_562481  
build-timeout:1.24  
caffeine-api:2.9.3-65.v6a\_47d0f4d1fe  
checks-api:1.8.1  
cloudbees-folder:6.740.ve4f4ffa\_dea\_54  
command-launcher:1.2  
commons-lang3-api:3.12.0-36.vd97de6465d5b\_  
commons-text-api:1.10.0-27.vb\_fa\_3896786a\_7  
conditional-buildstep:1.4.2  
config-file-provider:3.11.1  
configuration-as-code:1569.vb\_72405b\_80249  
credentials:1143.vb\_e8b\_b\_ceee347  
credentials-binding:523.525.vb\_72269281873  
dashboard-view:2.466.vdfefd95a\_b\_f8d  
display-url-api:2.3.6  
docker-commons:1.21  
docker-java-api:3.2.13-37.vf3411c9828b9  
docker-plugin:1.3.0  
docker-workflow:563.vd5d2e5c4007f  
durable-task:507.v050055d0cb\_dd  
echarts-api:5.4.0-1  
email-ext:2.92  
extra-columns:1.25  
font-awesome-api:6.2.1-1  
git:4.14.3  
git-client:3.13.1  
github:1.34.5  
github-api:1.303-400.v35c2d8258028  
github-branch-source:1696.v3a\_7603564d04  
gradle:2.8.2  
ionicons-api:31.v4757b\_6987003  
jackson2-api:2.14.2-319.v37853346a\_229  
jakarta-activation-api:2.0.1-2  
jakarta-mail-api:2.0.1-2  
javadoc:226.v71211feb\_e7e9  
javax-activation-api:1.2.0-5  
javax-mail-api:1.6.2-5  
jaxb:2.3.7-1  
jdk-tool:1.0  
jjwt-api:0.11.5-77.v646c772fddb\_0  
job-dsl:1.81.1  
jquery3-api:3.6.1-2  
jsch:0.2.8-65.v052c39de79b\_2  
junit:1166.1168.vd6b\_8042a\_06de  
ldap:659.v8ca\_b\_a\_fe79fa\_d  
mailer:435.438.v5b\_81173f5b\_a\_1  
matrix-auth:3.1.5  
matrix-project:772.v494f19991984  
maven-plugin:3.22  
momentjs:1.1.1  
okhttp-api:4.9.3-108.v0feda04578cf  
pam-auth:1.10  
pipeline-build-step:488.v8993df156e8d  
pipeline-github-lib:38.v445716ea\_edda\_  
pipeline-graph-analysis:202.va\_d268e64deb\_3  
pipeline-groovy-lib:629.vb\_5627b\_ee2104  
pipeline-input-step:466.v6d0a\_5df34f81  
pipeline-milestone-step:111.v449306f708b\_7  
pipeline-model-api:2.2121.vd87fb\_6536d1e  
pipeline-model-definition:2.2121.vd87fb\_6536d1e  
pipeline-model-extensions:2.2121.vd87fb\_6536d1e  
pipeline-rest-api:2.28  
pipeline-stage-step:305.ve96d0205c1c6  
pipeline-stage-tags-metadata:2.2121.vd87fb\_6536d1e  
pipeline-stage-view:2.28  
pipeline-utility-steps:2.15.0  
plain-credentials:143.v1b\_df8b\_d3b\_e48  
plugin-util-api:2.20.0  
popper2-api:2.11.6-2  
resource-disposer:0.20  
run-condition:1.5  
scm-api:631.v9143df5b\_e4a\_a  
script-security:1229.v4880b\_b\_e905a\_6  
snakeyaml-api:1.33-90.v80dcb\_3814d35  
ssh-credentials:305.v8f4381501156  
ssh-slaves:1.834.v622da\_57f702c  
sshd:3.0.3  
structs:324.va\_f5d6774f3a\_d  
tfs:5.157.1-SNAPSHOT (private-2163c3ae-gilad)  
timestamper:1.21  
token-macro:321.vd7cc1f2a\_52c8  
trilead-api:1.67.vc3938a\_35172f  
variant:59.vf075fe829ccb  
workflow-aggregator:596.v8c21c963d92d  
workflow-api:1200.v8005c684b\_a\_c6  
workflow-basic-steps:994.vd57e3ca\_46d24  
workflow-cps:3536.vb\_8a\_6628079d5  
workflow-durable-task-step:1217.v38306d8fa\_b\_5c  
workflow-job:1207.1209.v69351208a\_5a\_7  
workflow-multibranch:716.vc692a\_e52371b\_  
workflow-scm-step:408.v7d5b\_135a\_b\_d49  
workflow-step-api:639.v6eca\_cd8c04a\_a\_  
workflow-support:839.v35e2736cfd5c  
ws-cleanup:0.43

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [February 7, 2024, 8:49am UTC](https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312/2 "2024-02-07T08:49:23Z")

</div>

Version 2.346.3 is almost 2 years old. The plugin center only supports versions that are not older than 1 year approximately.  
You can still run this Jenkins version but you need to install plugins manually to ensure you get the right versions.  
But I would look into updating Jenkins as there are security vulnerabilities for that version.

---

<div class="post-metadata">

**Author:** ![Letizia](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Letizia](https://community.jenkins.io/u/Letizia)\
**Post date:** [February 7, 2024, 9:14am UTC](https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312/3 "2024-02-07T09:14:11Z")

</div>

Thanks, I know I should update jenkins, but that also requires updating all the agents and it costs time, so I need permission from my company.

However, it is strange that is redirected to the latest version instead of returning ko.

Any other ideas?

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [February 7, 2024, 10:20am UTC](https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312/4 "2024-02-07T10:20:09Z")

</div>

It needs to return something and the decision was to return the latest still supported information.  
afaik you can explicitly specify the version you want in the plugins.txt used by jenkins-plugin-cli

You could also setup your own update center that collects the info for you version but that is quite complex and requires a lot of work.

---

<div class="post-metadata">

**Author:** ![Letizia](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Letizia](https://community.jenkins.io/u/Letizia)\
**Post date:** [February 7, 2024, 3:52pm UTC](https://community.jenkins.io/t/jenkins-plugin-cli-download-wrong-plugin-version/12312/5 "2024-02-07T15:52:23Z")

</div>

Yes, I have already done it.

Thanks
