2017-10-05 202 views
0

作爲自動構建的一部分,我們從github運行下載一些代碼。小例子:Wget失敗,出現證書錯誤

wget github.com 

近日,命令開始證書錯誤而失敗:

URL transformed to HTTPS due to an HSTS policy 
--2017-10-05 11:43:45-- https://github.com/ 
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113 
Connecting to github.com (github.com)|192.30.253.112|:443... connected. 

ERROR: cannot verify github.com's certificate, issued by 'CN=DigiCert SHA2 Extended Validation Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US': 
    Unable to locally verify the issuer's authority. 

我試圖更新證書存儲,和wget本身:

update-ca-certificates 
apt-get install wget 

錯誤仍一樣。 我的wget版本是GNU Wget 1.17.1,操作系統是Ubuntu 16.04.3。

回答

0

答案證明是在數據包配置的某個地方。不幸的是,我無法確切地說出原因。懷疑是從ppa安裝的一些mono版本與我們的cert store有關。

0

您可以避免在wget命令行上檢查添加--no-check-certificate選項的證書的有效性。

+0

我知道,但我不想讓這部分構建過程。在安全方面看起來不是一個好主意。 – maniexx

+1

是的,我知道。僅建議一種解決方法。 – OscarAkaElvis

相關問題