apt update reports: Unauthorized IP

KatyComputer

Well-Known Member
Sep 26, 2019
196
16
58
62
St Louis
katycomputer.com
pmgsubscription get reports an active subcription:
checktime: 1741038519
key: pmgp-114514xxxx
level: p
nextduedate: 2025-03-18
productname: YajuuSenpai
regdate: 2025-03-03 15:48:39
serverid: 4EBA717BFEE76EFF662B345FF372xxxx
status: active
url: https://www.proxmox.com/proxmox-mail-gateway/pricing
Starting system upgrade: apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Your System is up-to-date

When I run apt update, I get an unauthorized IP message:
apt update -y
Hit:1 http://ftp.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Get:3 https://pkgs.tailscale.com/stable/debian bookworm InRelease
Hit:4 http://ftp.debian.org/debian bookworm-updates InRelease
Hit:5 http://download.proxmox.com/debian/pmg bookworm InRelease
Err:6 https://enterprise.proxmox.com/debian/pmg bookworm InRelease
401 Unauthorized [IP: 170.130.165.90 443]
Ign:7 https://repo.avcdn.net/linux-av/deb debian-bookworm InRelease
Hit:8 https://repo.avcdn.net/linux-av/deb debian-bookworm Release
Get:9 https://repo.avcdn.net/linux-av/deb debian-bookworm Release.gpg [854 B]
Ign:9 https://repo.avcdn.net/linux-av/deb debian-bookworm Release.gpg
Reading package lists... Done
E: Failed to fetch https://enterprise.proxmox.com/debian/pmg/dists/bookworm/InRelease 401 Unauthorized [IP: 170.130.165.90 443]
E: The repository 'https://enterprise.proxmox.com/debian/pmg bookworm InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Where have I gone wrong?
 
pmgsubscription get reports an active subcription:
checktime: 1741038519
key: pmgp-114514xxxx
level: p
nextduedate: 2025-03-18
productname: YajuuSenpai
regdate: 2025-03-03 15:48:39
serverid: 4EBA717BFEE76EFF662B345FF372xxxx
status: active
url: https://www.proxmox.com/proxmox-mail-gateway/pricing
Starting system upgrade: apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Your System is up-to-date

When I run apt update, I get an unauthorized IP message:
apt update -y
Hit:1 http://ftp.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Get:3 https://pkgs.tailscale.com/stable/debian bookworm InRelease
Hit:4 http://ftp.debian.org/debian bookworm-updates InRelease
Hit:5 http://download.proxmox.com/debian/pmg bookworm InRelease
Err:6 https://enterprise.proxmox.com/debian/pmg bookworm InRelease
401 Unauthorized [IP: 170.130.165.90 443]
Ign:7 https://repo.avcdn.net/linux-av/deb debian-bookworm InRelease
Hit:8 https://repo.avcdn.net/linux-av/deb debian-bookworm Release
Get:9 https://repo.avcdn.net/linux-av/deb debian-bookworm Release.gpg [854 B]
Ign:9 https://repo.avcdn.net/linux-av/deb debian-bookworm Release.gpg
Reading package lists... Done
E: Failed to fetch https://enterprise.proxmox.com/debian/pmg/dists/bookworm/InRelease 401 Unauthorized [IP: 170.130.165.90 443]
E: The repository 'https://enterprise.proxmox.com/debian/pmg bookworm InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Where have I gone wrong?
The issue occurs because Proxmox Mail Gateway (PMG) is trying to access the enterprise repository but is getting a 401 Unauthorized error, even though your subscription is active. Try the following solutions:

1️ Verify Subscription Key

Run:
bash
Code:
pmgsubscription get
Ensure the subscription status is active and matches the registered server.

2️ Manually Refresh the Subscription
bash
Code:
pmgsubscription update
apt update
If the issue persists, try rebooting the system and running apt update again.

3️ Check /etc/apt/sources.list.d/ for Incorrect Repositories

Run:
bash
Code:
cat /etc/apt/sources.list.d/pmg-enterprise.list

If it contains this line:
nginx
Code:
deb https://enterprise.proxmox.com/debian/pmg bookworm InRelease

Try replacing it with:
nginx
Code:
deb https://download.proxmox.com/debian/pmg bookworm pmg-no-subscription

Then, run the update again:
bash
Code:
apt update && apt upgrade -y

4️ Ensure Your Server IP Matches the Subscription

If your Proxmox instance has a dynamic IP, the subscription check may fail. Verify your external IP:
bash
Code:
curl -s ifconfig.me
If different from your registered IP, you may need to contact Proxmox support to update it.
 
@shbaek Please don't spam LLM-generated garbage... it's just a waste of time for people needing to read it... in particular step 3 doesn't make any sense whatsoever if one wants to use the enterprise repository.

@KatyComputer For subscription-related issues, please contact the enterprise support portal: https://my.proxmox.com/en