簡體   English   中英

在linux中安裝jenkins - 導入讀取失敗(-1)

[英]Installing jenkins in linux - import read failed(-1)

我想在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

我設法讓它為我工作但我必須更改以下導入:

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

有同樣的問題,最后通過使用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 name /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3': Unable to locally verify the issuer's authority. ERROR: certificate common name accounts.jenkins.io'與請求的主機名jenkins-ci.org'. To connect to jenkins-ci.org insecurely, use不匹配jenkins-ci.org'. To connect to jenkins-ci.org insecurely, use jenkins-ci.org'. To connect to jenkins-ci.org insecurely, use --no-check-certificate'。

所以只需在wget中使用--no-check-certificate選項,然后導入它。 這對我有用。

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/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM