2017-07-07 24 views
-1

我正在尝试使用Wget for Windows从特定URL下载文档。如何在Windows上的HTTPS URL上运行wget时修复证书错误?

当我这样做时,对于很多(但不是全部)网站,我收到证书错误。例如:

C:\temp> wget https://stackoverflow.com/ 

产地:

--2017-07-07 15:54:40-- https://stackoverflow.com/ 
Resolving stackoverflow.com (stackoverflow.com)... 151.101.193.69, 151.101.129.69, 151.101.1.69, ... 
Connecting to stackoverflow.com (stackoverflow.com)|151.101.193.69|:443... connected. 
ERROR: cannot verify stackoverflow.com's certificate, issued by 'CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US': 
    Unable to locally verify the issuer's authority. 
To connect to stackoverflow.com insecurely, use `--no-check-certificate'. 

由于错误信息显示,我可以通过包括--no-check-certificate参数与我的命令解决此问题。但是,我想避免这种情况,因为它(1)不安全,(2)麻烦。如您所料,我可以连接到https://stackoverflow.com/(以及其他受影响的网址),而不会在使用此电脑上的任何网络浏览器(Firefox,Chrome,Edge,IE,Vivaldi)时发生任何问题。

我没有运行Cygwin(所以答复this similar question不适用)。

有没有一种方法可以配置Wget for Windows使用我的操作系统和/或浏览器使用的相同的一组根证书,以便它不会产生“无法本地验证颁发者权限”错误?

+0

@jww我绝对明白你来自哪里。然而,这里和这个问题之间的相关性有什么区别:https://stackoverflow.com/questions/9224298/how-do-i-fix-certificate-errors-when-running-wget-on-an- HTTPS的网址中,Cygwin的 –

回答

1

我一直在使用的Wget for Windows版本(wget.exe)是从http://gnuwin32.sourceforge.net/packages/wget.htm开始的,版本号为1.11.4,日期为2008-12-31。

我刚刚使用版本号为1.19.1的https://eternallybored.org/misc/wget/的新版本替换了此版本,并提到了“Windows证书存储支持”。

使用新版本,我不再收到Unable to locally verify the issuer's authority错误,并且下载似乎安全无误地工作。

相关问题