简体   繁体   English

安装 Jenkins 时证书不受信任

[英]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.我们的 Ubuntu 服务器上的 Jenkins 实例出现问题,清除了我们的配置和包。

Because of that, we are attempting to re-install Jenkins on this server.因此,我们正在尝试在此服务器上重新安装 Jenkins。 However, we continue to get an error when running sudo apt-get update但是,我们在运行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/我们遵循了 Jenkins Ubuntu 安装页面上的所有步骤: 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).我们还确保从 apt 列表中删除 Jenkins 并添加回所有必要的文件(再次按照 Jenkins 页面上的步骤进行)。

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. sudo apt-get update <-- 这是我们收到上述错误的问题。

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 - 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我们在 Ubuntu 20.04 上运行 Java 版本 8

###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 ###EDITE### 我还在 Jenkins 网站上打开了一个线程,请参见下面的链接: 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.他们建议我的 ca 证书在此虚拟机上已过时,因此不接受 letsencrypt 根证书。

Please try first;请先尝试; sudo apt install ca-certificates then; sudo apt install ca-certificates 然后; sudo apt-get update. sudo apt-get 更新。

If that does not help try this sequence;如果这没有帮助,请尝试此顺序; sudo apt install --reinstall ca-certificates then; sudo apt install --reinstall ca-certificates 然后; sudo apt-get update. sudo apt-get 更新。

That worked for me even with company computer.即使使用公司计算机,这对我也有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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