ssl - Wget 因证书错误而失败

标签 ssl wget ubuntu-16.04

作为自动构建的一部分,我们运行从 github 下载一些代码。最小示例:

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。

最佳答案

您可以在 wget 命令行中添加 --no-check-certificate 选项来避免检查证书的有效性。

关于ssl - Wget 因证书错误而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46582724/

相关文章:

ssl - 进程收到套接字关闭消息之前的时间

python - 使用 python urllib2 访问 itop 数据库(通过 oql)

python - 命令 "python setup.py egg_info"失败,错误代码 1 in/tmp/pip-install-fs0wmmw4/mysqlclient/

python - 升级到适用于Python版本2.7.12的pip 10.0.0后的"ImportError: cannot import name main"-仅安装了一个版本的Python

linux - 在Nginx上服务外部文件

linux - 如何在 ubuntu 16.04 中安装 laravel 5.6?

c# - HTTPS POST/GET 不适用于 Mono

c# - 忽略 Web 服务中的证书错误?

asp.net - 使用哪个 .net 版本? Web 配置中的那个还是构建时使用的那个?

bash - wget - 继续重试