简体   繁体   中英

Certificate is NOT trusted when installing Jenkins

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: https://www.jenkins.io/doc/book/installing/linux/

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 - wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -

We are running java version 8 on Ubuntu 20.04

###EDITE### I have also opened a thread on the Jenkins site, see link below: https://community.jenkins.io/t/certificate-is-not-trusted-when-installing-jenkins/1255/7

They are suggesting that my ca-certs are out of date on this vm and thus are not accepting the letsencrypt root certificates.

Please try first; sudo apt install ca-certificates then; sudo apt-get update.

If that does not help try this sequence; sudo apt install --reinstall ca-certificates then; sudo apt-get update.

That worked for me even with company computer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM