美文网首页
报错 To connect to pkg.jenkins.io

报错 To connect to pkg.jenkins.io

作者: 空格键_尘 | 来源:发表于2019-11-29 19:53 被阅读0次

    远程调用下载文件直接用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

    相关文章

      网友评论

          本文标题:报错 To connect to pkg.jenkins.io

          本文链接:https://www.haomeiwen.com/subject/xrzgwctx.html