gpt4 book ai didi

ubuntu - 如何从本地 Artifactory 服务器获取 Ubuntu 机器上的软件包

转载 作者:行者123 更新时间:2023-12-04 19:00:13 24 4
gpt4 key购买 nike

有什么问题

我已经设置了本地 Artifactory 服务器来下载所有 debian/ubuntu 软件包。

这是我的远程仓库:

repo key : op.archive.ubuntu.com , URL : http://us.archive.ubuntu.com/ubuntu/
repo key : op.security.ubuntu.com, url : http://security.ubuntu.com/ubuntu

这映射到虚拟仓库:
https://<<url>>/artifactory/op-deb-debian-virtual

现在,在 ubuntu 机器上,这里是 /etc/apt/sources.list 的内容文件
deb https://<<url>>/artifactory/op-deb-debian-virtual/ stretch main contrib non-free
deb https://<<url>>/artifactory/op-deb-debian-virtual/ stretch-updates main contrib non-free

但是现在,当我运行 apt-get update命令,它失败并出现以下错误。无法理解,是 Artifactory 服务器、sources.list 还是其他问题

什么是错误

Err:5 https://<>/artifactory/op2-deb-debian-virtual stretch/main amd64 Packages 401 Unauthorized Ign:6 https://<>/artifactory/op2-deb-debian-virtual stretch/main i386 Packages Ign:7 https://<>/artifactory/op2-deb-debian-virtual stretch/main all Packages Ign:8 https://<>/artifactory/op2-deb-debian-virtual stretch/main Translation-en_US Ign:9 https://<>/artifactory/op2-deb-debian-virtual stretch/main Translation-en Ign:10 https://<>/artifactory/op2-deb-debian-virtual stretch/contrib amd64 Packages Ign:11 https://<>/artifactory/op2-deb-debian-virtual stretch/contrib i386 Packages Ign:12 https://<>/artifactory/op2-deb-debian-virtual stretch/contrib all Packages Ign:13 https://<>/artifactory/op2-deb-debian-virtual stretch/contrib Translation-en_US Ign:14 https://<>/artifactory/op2-deb-debian-virtual stretch/contrib Translation-en Ign:15 https://<>/artifactory/op2-deb-debian-virtual stretch/non-free amd64 Packages Err:20 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/main amd64 Packages 401 Unauthorized Ign:21 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/main i386 Packages Ign:22 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/main all Packages Ign:23 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/main Translation-en_US Ign:24 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/main Translation-en Ign:25 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/contrib amd64 Packages Ign:26 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/contrib i386 Packages Ign:27 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/contrib all Packages Ign:28 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/contrib Translation-en_US Ign:29 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/contrib Translation-en Ign:30 https://<>/artifactory/op2-deb-debian-virtual stretch-updates/non-free amd64 Packages Reading package lists... Done W: The repository 'https://<>/artifactory/op2-deb-debian-virtual stretch Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'https://<>/artifactory/op2-deb-debian-virtual stretch-updates Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch https://<>/artifactory/op2-deb-debian-virtual/dists/stretch/main/binary-amd64/Packages 401 Unauthorized E: Failed to fetch https://<>/artifactory/op2-deb-debian-virtual/dists/stretch-updates/main/binary-amd64/Packages 401 Unauthorized E: Some index files failed to download. They have been ignored, or old ones used instead.



预期结果

在sources.list 中添加适当的 Artifactory URL 后,应该可以工作。这就是我所做的,仍然无法正常工作

请建议

更新 1

上一个问题解决了。这是由于权限问题。我使用了用户名和密码(base 64 格式)并且它有效。但现在问题是 403 被禁止

确切的错误
E: Failed to fetch https://artifactory-na.honeywell.com/artifactory/op2-deb-debian-virtual/dists/xenial/main/binary-amd64/Packages  403  Forbidden
E: Failed to fetch https://artifactory-na.honeywell.com/artifactory/op2-deb-debian-virtual/dists/xenial-updates/main/binary-amd64/Packages 403 Forbidden
E: Failed to fetch https://artifactory-na.honeywell.com/artifactory/op2-deb-debian-virtual/dists/xenial-backports/main/binary-amd64/Packages 403 Forbidden
E: Failed to fetch https://artifactory-na.honeywell.com/artifactory/op2-deb-debian-virtual/dists/xenial-security/main/binary-amd64/Packages 403 Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.

对我来说,这条线,
E: Some index files failed to download. They have been ignored, or old ones used instead

正在触发。
是不是有点像,有些镜子掉了??我怎样才能解决这个问题 ... ?
即使镜子坏了,我觉得镜子或 apt-get 应该注意这一点??

请建议

最佳答案

在这种情况下出现 403 的最可能原因是 sources.list 中使用的用户没有远程存储库(op.archive.ubuntu.com 和 op.security.ubuntu.com)的“部署”权限

关于ubuntu - 如何从本地 Artifactory 服务器获取 Ubuntu 机器上的软件包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57786530/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com