【问题标题】:Installing jenkins in linux - import read failed(-1)在 linux 中安装 jenkins - 导入读取失败(-1)
【发布时间】:2017-02-17 05:18:28
【问题描述】:

我正在尝试在 linux 机器上安装 Jenkins: 后续步骤:

1> wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
2 >rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key 

在导入密钥时我得到了

error: https://jenkins-ci.org/redhat/jenkins-ci.org.key: import read failed(-1).

请帮我解决这个问题。

 vi  /etc/yum.repos.d/jenkins.repo
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1

【问题讨论】:

    标签: linux http jenkins proxy


    【解决方案1】:

    我设法让它为我工作,但我必须为导入更改以下内容:

    sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
    sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
    sudo yum install jenkins
    

    【讨论】:

      【解决方案2】:

      遇到同样的问题,最后通过使用 wget 在本地下载密钥然后能够导入来解决它。使用 wget 时,必须使用标志不检查证书...

      一开始使用wget时遇到如下错误:

      错误:无法验证 jenkins-ci.org 的证书,由 /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3': Unable to locally verify the issuer's authority. ERROR: certificate common nameaccounts.jenkins.io 颁发'与请求的主机名 jenkins-ci.org'. To connect to jenkins-ci.org insecurely, use--no-check-certificate'不匹配。

      所以只需使用 wget 的 --no-check-certificate 选项,然后导入它。这对我有用。

      【讨论】:

        【解决方案3】:
        wget -q -o - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
        
        sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
        
        sudo apt-get update
        
        sudo apt-get install jenkins
        

        来源:https://jenkins.io/doc/book/installing/

        【讨论】:

        • 您可以并且应该使用 {} 按钮格式化您的代码。
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-04-24
        • 2012-03-05
        • 2016-03-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-05-31
        相关资源
        最近更新 更多