Albert repository GPG key issues on debian derivates

albertapt

There are several problems (predominantly EXPKEYSIG) that can occur due to the keys published by OBS, which are valid only for about two years.

Best Answer

Theres not much you can do about expired keys, but to get a new valid one. Seems easy but still there are some caveats.

Note that multiple keys have been distributed in the past: the global key and a key for each distribution. Also recommended code snippets in the past put the keys in different locations (/etc/apt/trusted.gpg and /etc/apt/trusted.gpg.d/[…]).

This tutorial will try to fix all possible issues and get apt to work again.

1. Keys embedded in /etc/apt/trusted.gpg

Use apt-key del <id> to remove the key. Find the id of the repo home:manuelschneid3r using apt-key list.

# apt-key list
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub   rsa2048 2017-10-27 [SC] [expired: 2022-03-05]
      A4B8 3CD0 5FDF 5C51 7848  2D4A 1488 BLAA E192 A257
uid           [ expired] home:manuelschneid3r OBS Project <home:[email protected]>

[…]

# apt-key del "A4B8 3CD0 5FDF 5C51 7848  2D4A 1488 BLAA E192 A257"

2. Keys in /etc/apt/trusted.gpg.d/

Remove any keys related to Albert in /etc/apt/trusted.gpg.d/. Note that, depending on the snippet you used to install albert, this keys may have obscure names. If you used the snipped on the official software center at OBS, the file is likely to have the name home_manuelschneid3r.gpg.

rm /etc/apt/trusted.gpg.d/home_manuelschneid3r.gpg 
3. Sources list

apt will now refuse to work with the error

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY …

If you want to keep albert, you can fetch a new key now. This is exactly what you did when you initially installed albert. Visit the OBS software center for the code snippet.

If you dont need albert anymore, remove the repository from your sources by removing either the relevant line in /etc/apt/sources.list or the file /etc/apt/sources.list.d/home:manuelschneid3r.list, depending on how you installed albert.

You're done. Have fun using albert 🍻

Related Question