Proxmox apt-get update fails
Asked Answered
M

2

7

When I type in the bash of the Server apt-get update it fails, I don't know why. The error is:

E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 2a01:7e0:0:424::249 443]

E: The repository 'https://enterprise.proxmox.com/debian/pve buster 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(8) manpage for repository creation and user configuration details.

Masonry answered 25/5, 2020 at 8:14 Comment(0)
I
10

The apt package manager on the fresh Proxmox host is configured to download packages from Enterprise Repository by default. You must have a paid subscription to use this repo. If you don't have paid subscription you should switch to No-Subscription Repository.

Either delete /etc/apt/sources.list.d/pve-enterprise.list file or comment all lines in this file with #.

Create new file /etc/apt/sources.list.d/pve-no-subscription.list with content:

deb http://download.proxmox.com/debian/pve buster pve-no-subscription

Read about Proxmox package repositories here: https://pve.proxmox.com/wiki/Package_Repositories

Intertexture answered 29/5, 2020 at 13:16 Comment(0)
F
1

I came across this answer when looking for a solution to similar GPG errors when trying to update Proxmox while running the Debug terminal during a fresh install. This is a rather old question, but I haven't found a better place to give a more detailed answer other than the Proxmox forums.

As Moayad Almalat says above, you need to buy an Enterprise subscription or disable that repository and add the pve-no-subscription repository instead. This is the easiest one-line command to add the no-sub repo (don't forget to remove or disable the enterprise repo though):

echo "deb [trusted=yes] http://download.proxmox.com/debian/pve $(lsb_release -s -c) pve-no-subscription" > /etc/apt/sources.list.d/pve-no-sub-repo.list

Once those changes are made, you need to make sure your GPG Keys for the new repositories are in place:

wget https://enterprise.proxmox.com/debian/proxmox-release-$(lsb_release -s -c).gpg -O /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -s -c).gpg

wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg

If you still have GPG issues when trying to run apt update, you can make sure the GPG keys have the proper permissions by using:

chmod +r /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -s -c).gpg

chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg

Again, as Moayad Almalat mentioned, you can read most of this on the Proxmox wiki here: https://pve.proxmox.com/wiki/Package_Repositories

Finnic answered 18/11, 2022 at 2:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.