无法获取 https://packages.openvpn.net/.../dists/lunar/InRelease 403 禁止

无法获取 https://packages.openvpn.net/.../dists/lunar/InRelease 403 禁止

我现在在 I9 cpu + Nvidia Geforce RTX 2080 ti 和驱动程序 545 上运行 Ubuntu 23.10。我想在我的 Ubuntu 上安装 OpenVPN 3 客户端,但我无法安装存储库:

这是我正在遵循的指南:

https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux

我做了几次尝试:

1)

# apt install apt-transport-https curl
# mkdir -p /etc/apt/keyrings    ### This might not exist in all distributions
# curl -sSfL https://packages.openvpn.net/packages-repo.gpg >/etc/apt/keyrings/openvpn.asc
# echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/ubuntu lunar main" >>/etc/apt/sources.list.d/openvpn3.list
# apt update

Err:7 https://packages.openvpn.net/openvpn3/ubuntu lunar InRelease
  403  Forbidden [IP: 104.18.110.96 443]
Reading package lists... Done
E: Failed to fetch https://packages.openvpn.net/.../dists/lunar/InRelease  403  Forbidden [IP: 104.18.110.96 443]
E: The repository 'https://packages.openvpn.net/openvpn3/ubuntu lunar InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(manpage for repository creation and user configuration details).
# apt install apt-transport-https curl
# mkdir -p /etc/apt/keyrings    ### This might not exist in all distributions
# curl -sSfL https://packages.openvpn.net/packages-repo.gpg >/etc/apt/keyrings/openvpn.asc
# echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/debian bookworm main" >>/etc/apt/sources.list.d/openvpn3.list
# apt update

Get:8 https://packages.openvpn.net/openvpn3/debian bookworm/main amd64 Packages [3,996 B]
Fetched 9,833 B in 1s (7,890 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.openvpn.net/openvpn3/debian bookworm InRelease' does not seem to provide it (sources.list entry misspelt?)
# apt install apt-transport-https curl
# mkdir -p /etc/apt/keyrings    ### This might not exist in all distributions
# curl -sSfL https://packages.openvpn.net/packages-repo.gpg >/etc/apt/keyrings/openvpn.asc
# echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/ubuntu jammy main" >>/etc/apt/sources.list.d/openvpn3.list
# apt update

Err:7 https://packages.openvpn.net/openvpn3/ubuntu jammy InRelease
  403  Forbidden [IP: 104.18.110.96 443]
Reading package lists... Done
E: Failed to fetch https://packages.openvpn.net/.../dists/jammy/InRelease  403  Forbidden [IP: 104.18.110.96 443]
E: The repository 'https://packages.openvpn.net/openvpn3/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(manpage for repository creation and user configuration details).

如何 ?

答案1

说明:

使用上表中的版本名称替换下面命令中的 DISTRIBUTION 部分,以设置 apt 源列表:

# echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/debian DISTRIBUTION main" >>/etc/apt/sources.list.d/openvpn3.list

没有告诉替换debianubuntu,只是替换DISTRIBUTION为(针对您的情况)lunar(或者实际上mantic匹配 Ubuntu 23.10,如果它确实可用)。

差异可以这样看:

# curl --head https://packages.openvpn.net/openvpn3/ubuntu/dists/lunar/InRelease
HTTP/2 403 
date: Sun, 12 Nov 2023 19:13:45 GMT
content-type: application/xml
x-cache: Error from cloudfront
via: 1.1 83d0137377604ae8e59d0712f3ef6fe2.cloudfront.net (CloudFront)
x-amz-cf-pop: CDG50-P4
x-amz-cf-id: laB_0LYJFnyy0606N7PZLa-0W5RrIIcV8WhY94yEJW9L5P11wNpNlA==
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 8251180dfaa4d712-CDG

# curl --head https://packages.openvpn.net/openvpn3/debian/dists/lunar/InRelease
HTTP/2 200 
date: Sun, 12 Nov 2023 19:14:17 GMT
content-type: binary/octet-stream
content-length: 5834
last-modified: Fri, 20 Oct 2023 12:38:14 GMT
x-amz-server-side-encryption: AES256
x-amz-version-id: bY4e_Bp3DQ08SopZYWEh_Npc9FlsW9sW
accept-ranges: bytes
etag: "ff8c6bcfcb12d04e55111e1b27e8b6d4"
x-cache: Hit from cloudfront
via: 1.1 0df1e08a236a7f5d1f4f9f78bdb4bb82.cloudfront.net (CloudFront)
x-amz-cf-pop: CDG50-P4
x-amz-cf-id: lq2UQ8jH4jAAXflV75X4EkwiGR14qpzv5YD29ma4GesxmLNGFSoDNg==
age: 31637
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 825118d80af70051-CDG

# curl --head https://packages.openvpn.net/openvpn3/debian/dists/mantic/InRelease
HTTP/2 200 
date: Sun, 12 Nov 2023 19:20:55 GMT
content-type: binary/octet-stream
content-length: 5835
last-modified: Fri, 20 Oct 2023 12:38:14 GMT
x-amz-server-side-encryption: AES256
x-amz-version-id: X9oVa0sKru7sF5UfEl17Aor_StRj.80H
accept-ranges: bytes
etag: "ad10f89d73c40adfc3ab9eba92befdab"
x-cache: Hit from cloudfront
via: 1.1 03e404344c9f165c7468cdb109674f3a.cloudfront.net (CloudFront)
x-amz-cf-pop: CDG50-P4
x-amz-cf-id: larhe4f3E2Y_fdbNygPShe0DiYfJZS7PxUp_SxfEsIm41Nox1fr41Q==
age: 17906
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 82512292284e019e-CDG

细节很重要。

如果返回的错误是 404(未找到)而不是 403(禁止),效果会更好。

相关内容