我正在使用Ubuntu20.04在Azure VM上安装Jenkins,下面的命令行如下:
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
/etc/apt/sources.list.d/jenkins.list'
sudo apt-get update -y
sudo apt-get install jenkins -y
但是,当我试图用最后一个命令安装Jenkins时,就会发生这样的情况:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
jenkins
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 91.4 MB of archives.
After this operation, 95.0 MB of additional disk space will be used.
Err:1 https://pkg.jenkins.io/debian-stable binary/ jenkins 2.332.3
Redirection from https to 'http://mirrors.jenkins.io/debian-stable/jenkins_2.332.3_all.deb' is forbidden [IP: 146.75.30.133 443]
E: Failed to fetch https://pkg.jenkins.io/debian-stable/binary/jenkins_2.332.3_all.deb Redirection from https to 'http://mirrors.jenkins.io/debian-stable/jenkins_2.332.3_all.deb' is forbidden [IP: 146.75.30.133 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我怎样才能解决这个问题?
发布于 2022-05-28 11:55:35
(Ubuntu22.04)我已经手动安装了“net”,就在"Jenkins“开始安装之后。因此,我改变了我的Ansible yaml
---
- name: Install dependencies
apt:
name: net-tools
state: present
- name: ensure the jenkins apt repository key is installed
apt_key:
<skipped>
https://stackoverflow.com/questions/72412100
复制相似问题