We had an issue with our instance of Jenkins on our Ubuntu server which purged our configs and packages.
Because of that, we are attempting to re-install Jenkins on this server. However, we continue to get an error when running sudo apt-get update
Err:6 https://pkg.jenkins.io/debian-stable binary/ Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 151.101.194.133 443]
We have followed all the steps on the Jenkins Ubuntu install page:
We have also made sure to remove Jenkins from the apt list and add back all the necessary files (once again by following the steps on the Jenkins page).
The steps we have tried:
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update ā This is the issue where we get the error mentioned above.
I have also tried: wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -
Usually when there is a report that the certificate is not trusted, it is because the operating system list of certificates is out of date. Be sure that youāve run apt-get update && apt-get upgrade on that operating system so that it downloads and installs the latest certificate authorities.
I can confirm its valid and working. You may want to confirm a certificate package was updated for your OS version. (You need to update your local certs before running the update-ca-certificates function)
I donāt know offhand. update-ca-certificates takes the certs in the directory and installs them properly. One of the debian packages, maybe ca-certificates is the one that installs the latest ones for debian.
I would recommend googling for your version of linux (debian, ubuntu, arch, etc) and the version, and how to update it to support the letsencrypt root certificates.
I have the same issue and have came to this post numerous times just because there wasnāt any other post out there.
As @MarkEWaite previously posted the DST Root CA X3 Expiration (September 2021) - Let's Encrypt Letās Encrypt CA has expired. So a possible solution that worked for me, would be to check if there is a line in your /etc/ca-certificates.conf file and if there is comment it out by adding an exclamation mark.
And then run āsudo update-ca-certificatesā - that will update the changes that you just made. After that try running sudo apt update once again.
I am facing this issue on Ubuntu(22.04) which is hosted on Azure.
I followed all instructions mentioned/available on internet but still seeing the same error message like below.
azureuser@azu-svl-xxxx$ sudo apt-get install jenkins -y
Reading package listsā¦ Done
Building dependency treeā¦ Done
Reading state informationā¦ Done
The following packages were automatically installed and are no longer required:
libllvm13 libvulkan1 libwayland-client0 libxcb-randr0 mesa-vulkan-drivers
Use āsudo apt autoremoveā to remove them.
The following NEW packages will be installed:
jenkins
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 93.7 MB of archives.
After this operation, 94.3 MB of additional disk space will be used.
Err:1 Debian Jenkins Packages binary/ jenkins 2.375.3
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 146.112.56.46 443]
E: Failed to fetch https://ftp.halifax.rwth-aachen.de/jenkins/debian-stable/jenkins_2.375.3_all.deb Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 146.112.56.46 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Tried so far:
I have reinstalled ca-certificate package multiple time
executed apt update and upgrade
Copied ca-certificate.crt from one of working instance of Jenkins but still same issue
I would really appreciate any help as I have spent almost a week on this but solution till now
Hi Mark,
Thanks for you suggestion. I have executed the same commond as you and compared the output. In my output issuer is Issuer: O = Cisco, CN = Cisco Umbrella Secondary SubCA lon-SG
is that correct one ? and also when I check in browser it shows certificate is not valid. Please see below snapshot.
It seems like something is intercepting your requests and altering them. You might try a google search for that specific issuer. When I searched, it found this article that might point you in the right direction.