apt-get update - 401 Unauthorized

Daffy82

New Member
Aug 16, 2024
4
3
3
When I try to update my proxmox im getting this error:


starting apt-get update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.dk.debian.org/debian bookworm InRelease
Hit:3 http://download.proxmox.com/debian/pve bookworm InRelease
Hit:4 http://ftp.dk.debian.org/debian bookworm-updates InRelease
Err:5 https://enterprise.proxmox.com/debian/ceph-quincy bookworm InRelease
401 Unauthorized [IP: 212.224.123.70 443]
Err:6 https://enterprise.proxmox.com/debian/pve bookworm InRelease
401 Unauthorized [IP: 212.224.123.70 443]
Reading package lists...
E: Failed to fetch https://enterprise.proxmox.com/debian/ceph-quincy/dists/bookworm/InRelease 401 Unauthorized [IP: 212.224.123.70 443]
E: The repository 'https://enterprise.proxmox.com/debian/ceph-quincy bookworm InRelease' is not signed.
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/bookworm/InRelease 401 Unauthorized [IP: 212.224.123.70 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve bookworm InRelease' is not signed.
TASK ERROR: command 'apt-get update' failed: exit code 100

This is my /etc/apt/sources.list
Code:
deb http://ftp.dk.debian.org/debian bookworm main contrib


deb http://ftp.dk.debian.org/debian bookworm-updates main contrib


# security updates
deb http://security.debian.org bookworm-security main contrib


# not for production use


deb [trusted=yes] http://download.proxmox.com/debian/pve bookworm pve-no-subscription

Can anyone see what I am doing wrong?


Edit: got it to work. With these settings:

1724391573108.png
 
Last edited:
Proxmox puts the enterprise repo in a file in /etc/apt/sources.list.d/
You probably did not delete this file when you modified the main sources.list file, so the repo was still active.

The web gui shows all repos from the main sources.list and all additional files in the subdirectory, that’s why you could see it there and disable it.
 
  • Like
Reactions: subodhk
Proxmox puts the enterprise repo in a file in /etc/apt/sources.list.d/
You probably did not delete this file when you modified the main sources.list file, so the repo was still active.

The web gui shows all repos from the main sources.list and all additional files in the subdirectory, that’s why you could see it there and disable it.
I deleted the /etc/apt/sources.list.d/ directory and I was able to get apt update working, but I had issues installing some external packages as I deleted the whole directory. Recreating the /etc/apt/sources.list.d/ fixed the issues.
 
The best way for beginners to manipulate the repo files is via PVE GUI:
Datacenter>Nodes>[NODE]>Updates>Repositories

This option provides easy way to enable/disable repo without removing files. One can then examine the resulting files if they were curious.

Cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited: