报错 To connect to pkg.jenkins.io insecurely, use `--no-check-certificate'.

远程调用下载文件直接用wget http就可以,一般文件路径类型是http。如果有遇到是https就会下载出错。

例如:
[root@localhost jenkins]# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
-bash: udo: command not found
[root@localhost jenkins]# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2019-11-29 20:48:39-- https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 52.202.51.185
Connecting to pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443... connected.
ERROR: cannot verify pkg.jenkins.io's certificate, issued by ‘/C=US/ST=VeriSign, Inc./L=VeriSign Trust Network/O=Terms of use at https://www.verisign.com/rpa/OU=Terms of use at https://www.verisign.com/rpa/CN=VeriSign Class 1 Extended Validation CA’:
Unable to locally verify the issuer's authority.
To connect to pkg.jenkins.io insecurely, use `--no-check-certificate'.

只需要在wget后面加上--no-check-certificate就可以,需要一个认证下载指令而已。

即:sudo wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容