例如,运行wget https://www.dropbox.com会出现以下错误:

ERROR: The certificate of `www.dropbox.com' is not trusted.
ERROR: The certificate of `www.dropbox.com' hasn't got a known issuer.

当前回答

也许这会有所帮助:

wget --no-check-certificate https://blah-blah.tld/path/filename

其他回答

在我的例子中,在树莓派3B上,时间是在未来(2025年),我需要使用ntpdate通过将时间传递到过去来更新到当前的本地时间,它解决了这个问题。

 $ sudo date +%Y%m%d -s "20210101"
 $ sudo ntpdate times1.mike.fi

我也遇到过类似的问题,在安装新的SSL证书后,wget到我自己的实时网站返回错误。我已经检查了几个浏览器,他们没有报告任何错误:

wget——no-cache - o- "https://example.com/…"错误:' example.com '的证书不受信任。错误:' example.com '的证书没有已知的颁发者。

问题是我安装了错误的证书颁发机构。pem/。来自发行者的CRT文件。通常他们会将SSL证书和CA文件打包成zip文件,但DigiCert会将证书通过电子邮件发送给您,您必须自己找出匹配的CA。https://www.digicert.com/help/有一个SSL证书检查器,它列出了SSL权威和希望匹配的CA,如果他们同意,一个漂亮的蓝色链接图形:

SSL Cert: Issuer GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1

CA: Subject GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1 有效期为2020年7月16日至2023年5月31日 颁发者DigiCert全球根CA '

看看目前的解决方案在这里,我觉得我必须描述一个合适的解决方案。

首先,您需要通过cygwin的setup.exe安装cygwin包ca-certificates以获得证书。

不要使用curl或类似的黑客来下载证书(作为相邻的回答建议),因为这从根本上是不安全的,可能会危及系统。

其次,您需要告诉wget证书的位置,因为在Cygwin环境中,默认情况下wget不会获取证书。如果您可以使用命令行参数——ca-directory=/usr/ssl/certs(最适合shell脚本)或将ca_directory =/usr/ssl/certs添加到~/,则可以这样做。wgetrc文件。

您也可以通过运行ln -sT /usr/ssl /etc/ssl来解决这个问题,这在另一个答案中指出,但只有当您对系统有管理访问权限时才会起作用。我描述的其他解决方案不需要这样做。

We just had this same issue come up when we installed a newly minted certificate just this last week. I've also seen it two other times...yet I'm slow to learn. In all 3 cases I had to get the "intermediate certificates" and install them. In other words My cert was good but it's signer or it's signer's signer wasn't correctly installed. Make sure you go to your certificate provider's site and get the correct intermediate certificates and install them as well on your server and then this warning will go away.

可能不仅仅是上面的原因,也可能是客户没有更新列表……但我会确保这不仅仅是你没有完全安装正确的证书,然后再到客户端,并确保他们的列表更新。

如果您不关心检查证书的有效性,只需在wget命令行上添加——no-check-certificate选项。这对我来说很有效。

注意:这将使您容易受到中间人(MitM)攻击,不建议在任何您关心安全性的情况下使用。