[SOLVED] Public key not available when using apt update

Hi,

would you mind taking a look at the file in question? Maybe post the output of the following two commands (and put them between [code][/code] tags for proper formatting):

  • ls -lah /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
  • file /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg

Thanks!
 
  • Like
Reactions: Stoiko Ivanov
Hi,

would you mind taking a look at the file in question? Maybe post the output of the following two commands (and put them between [code][/code] tags for proper formatting):

  • ls -lah /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
  • file /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg

Thanks!
Code:
--2022-07-07 14:25:14--  https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg
Resolving enterprise.proxmox.com (enterprise.proxmox.com)... 144.217.225.162, 2607:5300:203:7dc2::162
Connecting to enterprise.proxmox.com (enterprise.proxmox.com)|144.217.225.162|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1187 (1.2K) [application/octet-stream]
Saving to: ‘proxmox-release-bullseye.gpg’

     0K .                                                     100% 30.9M=0s

2022-07-07 14:25:15 (30.9 MB/s) - ‘proxmox-release-bullseye.gpg’ saved [1187/1187]




Code:
root@control:~# ls -lah /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
-rw-r--r-- 1 root root 597 Jul  7 14:25 /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
root@control:~# file /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg: UTF-8 Unicode text
root@control:~# nano /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
root@control:~#
 
Hi,

root@control:~# file /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg: UTF-8 Unicode text
Interesting this should say something like this:
Code:
proxmox-release-bullseye.gpg: PGP/GPG key public ring (v4) created Mon Nov  9 07:59:32 2020 RSA (Encrypt or Sign) 4096 bits MPI=0xdd11e2fb853c0195...

I am curious what you saw in nano. Maybe you could post the output of cat /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg I deliberately didn't want you to open it in an editor because a) this file contains binary data so wouldn't be display properly and b) accidentally changing they key would obviously invalidate it.

For now, let's just try re-installing the key and see if that fixes it. Please run the following commands in order and post their output here, thanks!
  1. Install the key: wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
  2. Verify it's checksum:
    Code:
    sha512sum -c <(echo "7fb03ec8a1675723d2853b84aa4fdb49a46a3bb72b9951361488bfd19b29aab0a789a4f8c7406e71a69aabbc727c936d3549731c4659ffa1a08f44db8fdcebfa /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg")
    This should output something like: /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg: OK. If it does not, something went wrong, check if step 1 was executed correctly.
  3. Run apt update to make sure the key is working as it should.
 
Oh also I should mention: Please copy step 2 exactly. If you type it in manually one typo will cause it to not work at all, so please copy it. Thanks!
 
1657725520848.png
That fixed it!! So it must have been a bad registered key it sounds like? So you just ran the code to pull it off the internet and overwrite it, it seems like.
And heres the results of the cat
1657725557301.png
 
Hi,
That fixed it!! So it must have been a bad registered key it sounds like? So you just ran the code to pull it off the internet and overwrite it, it seems like.
yeah that command just re-installed the key as per the manual [1].

And heres the results of the cat
Ah sorry, should have mentioned: The output of cat before re-installing the key. Since file reported it as a text file I was curious what's in it. Shouldn't matter now though.

[1]: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#repos_secure_apt
 
Also: Please mark this thread as closed so others can find a solution more easily when they encounter this problem.
Thanks!
 
  • Like
Reactions: forcegc

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!