我正在尝试根据官方documentation安装ELK。我在使用自己的证书的公司防火墙后面。因此,在第一步中,我将使用wget的--no-check-certificate
选项添加公钥。
但是,在将仓库添加到/etc/apt/sources.list.d/elastic-7.x.list
之后,运行#apt-get update
时出现以下错误:
root@ubuntu:~# sudo apt-get update && sudo apt-get install elasticsearch
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Err:5 https://artifacts.elastic.co/packages/7.x/apt stable Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
Reading package lists... Done
E: The repository 'https://artifacts.elastic.co/packages/7.x/apt stable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我尝试将[trusted=yes]
添加到.list
文件中:
deb [trusted=yes] https://artifacts.elastic.co/packages/7.x/apt stable main
但是,在尝试更新apt时会导致更多错误:
Ign:1 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Ign:2 https://artifacts.elastic.co/packages/7.x/apt stable Release
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Hit:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Hit:11 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Err:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Reading package lists... Done
E: Failed to fetch https://artifacts.elastic.co/packages/7.x/apt/dists/stable/main/binary-amd64/Packages Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案 0 :(得分:0)
我想出了解决方法:通过提取由公司防火墙强加的SSL证书并将其添加到受信任证书列表中,我解决了以下问题:
echo -n | openssl s_client -showcerts -servername -connect github.com:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $(curl-config --ca)
答案 1 :(得分:0)
我通过在 uoe
中使用导致大致
/etc/ssl
调试起来很不方便,希望对以后的胖子有所帮助。