当前位置:   article > 正文

解决wget不能下载https文件问题_cannot verify download.fastgit.org's certificate,

cannot verify download.fastgit.org's certificate, issued by ‘/c=be/o=global

使用wget下载https协议的文件时遇到了这个问题,提示:

ERROR: cannot verify xx.xx.com's certificate, issued by `/C=BE/O=GlobalSign nv-sa/CN=GlobalSign Organization Validation CA - SHA256 - G2':
  Unable to locally verify the issuer's authority.
ERROR: certificate common name `*.alicdn.com' doesn't match requested host name `xx.xx.com'.
To connect to xx.xx.com insecurely, use `--no-check-certificate'.
无法建立 SSL 连接。
  • 1
  • 2
  • 3
  • 4
  • 5

错误提示中建议使用“--no-check-certificate”参数,用法是这样的:
wget https://xx.xx.com/xx.exe --no-check-certificate
  • 1

讲真的,英文不好,这个参数总记不住,想说wget是不是可以配置默认加上这个参数。
wget的配置文件叫“.wgetrc,直接将这个参数写进配置文件即可。


linux系统一般位于 ~/.wgetrc/etc/wgetrc,快速写入配置文件:

echo --no-check-certificate >> ~/.wgetrc
  • 1

windows位于 %userprofile%/.wgetrc,快速写入配置文件:

echo --no-check-certificate >> %userprofile%/.wgetrc
  • 1

还能配置代理信息,例如:
#You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://127.0.0.1:8087/
http_proxy = http://127.0.0.1:8087/
ftp_proxy = http://127.0.0.1:8087/

# If you do not want to use proxy at all, set this to off.
use_proxy = on
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

一个简单的wgetrc文件示例
https://www.gnu.org/software/wget/manual/html_node/Sample-Wgetrc.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/90104
推荐阅读
相关标签
  

闽ICP备14008679号