Jenkins plugin installation error resolved

[Solved] Jenkins Plugin Installtion Failed: Downloaded file /var/lib/jenkins/plugins/ does not match expected SHA-1

Issue

While installing or updating Jenkins plugins, it fails and throws the following SHA-1 error.

java.io.IOException: Downloaded file /var/lib/jenkins/plugins/*.tmp does not match expected SHA-1, expected 'f2ncNlydUUSPrk6SoG255v+2kQU=', actual 'lZRJco4Ouv1j0AG4Aet7HadHg/Q='

Here is the reference image of the error

Jenkins plugin installation/upgrade error

Solution

This error could happen due to the following reasons.

  1. Jenkins update center is not synced with your Jenkins
  2. You are running Jenkins behind a proxy.

Please find the solution for each scenarios below.

Jenkins Update Center is not Synced

Follow the below steps to rectify the sync issue.

Step 1: Go to manage Jenkins --> Manage Plugins and click the advanced tab. Scroll down and towards the end of the page, you will find the Update Site option as shown below. Click check now and sync with the update center.

Step 2: Restart the Jenkins server.

Now if you you try to install or upgrade the plugins, you should not see the SHA-1 error.

Update Corporate Proxy Settings for Jenkins Plugins

If you are running Jenkins behind a corporate proxy, you need to update the proxy settings for Jenkins plugin installtion and updates.

If you do not have the proxy details, you can talk to your Network administrator and get the proxy details.

Once you have the details, Go to manage Jenkins --> Manage Plugins and click the advanced tab. You will find the “HTTP Proxy Configuration” at the top.

Enter the proxy details and validate it with the update center URL as shown below.

Note: If you have any internal IP ranges or DNS which doesn’t need proxy, add it to the “No Proxy Host” box. Or else you jobs might fail trying to connect to service via proxy.

On successful validation, save the configurations and try installing the plugins. If the issue persists, try a server restart as well.

Jenkins plugin installation error resolved

Other Interesting Blogs

Leave a Comment

19 Shares
Share via
Copy link
Powered by Social Snap