1.初始命令
在sh脚本中使用wget命令下载文件。
data_URL="http://xxx"
wget -P source/token $data_URL/${source}.en.token
2.报错
报错详情:
ERROR: cannot verify data.statmt.org's certificate, issued by ‘CN=R3,O=Let's Encrypt,C=US’:
Issued certificate has expired.
To connect to data.statmt.org insecurely, use `--no-check-certificate'.
其中给出提示:建立链接时需要在命令行中添加--no-check-certificate。
3.解决方案
data_URL="http://xxx"
wget -P source/token --no-check-certificate $data_URL/${source}.en.token
在 wget 命令后面添加 --no-check-certificate,成功下载。