GPG keys issue at system update

chei gpg expirate

After Academix GNU/Linux installation, it’s good to make an update. Therefore, an important first step in gearing up of the system is the adding the Debian components to sources: contrib non-free. Synaptic, refreshes the repository indexes due to the changes being made. Changes are also made by editing in the terminal at /etc/apt/sources.list.

The error occurs when the GPG keys expires on some repositories. Our case is Vivaldi web browser, but I also had the case of Pale Moon Browser.

Why is it happening?

Bibliography; Academix GNU/Linux Manual, adapted by Debian Manual Administrator, explains:

“APT needs a set of trusted GnuPG public keys to verify signatures in the InRelease and Release.gpg files available on the mirrors. It gets them from files in /etc/apt/trusted.gpg.d/ and from the /etc/apt/trusted.gpg keyring (managed by the apt-key command).”

“IN PRACTICE; this means adding trusted keys.

When a third-party package source is added to the sources.list file, APT needs to be told to trust the corresponding GPG authentication key (otherwise it will keep complaining that it can’t ensure the authenticity of the packages coming from that repository). The first step is of course to get the public key.”

What should we do!?

If we do not need Vivaldi, (graphical mode):

Synaptic —> Settings —> Other Software —> uncheck the box (Vivaldi repository);

In command line mode::

$ cd /etc/sources.list.d

/etc/sources.list.d$ nano /etc/sources.list.d

In nano editor, make a comment, prepending the line with #:

[vivaldi.list]

deb https://repo.vivaldi.com/stable/deb/ stable main

and the line will look like:

# deb https://repo.vivaldi.com/stable/deb/ stable main

Or, we simply delete the line. Now we need to delete the expired GPG keys. We will list the Vivaldi keys with the following command (output will show my case):

# apt-key list | grep -B4 vivaldi

Warning: apt-key output should not be parsed (stdout is not a terminal)

sub rsa2048 2010-06-22 [E]

pub rsa4096 2018-01-05 [SC] [expired: 2020-01-25]

uid [ expired] Vivaldi Package Composer KEY04 <packager@vivaldi.com>

—

sub rsa2048 2010-06-28 [E]

pub rsa4096 2018-12-04 [SC] [expired: 2021-01-22]

B44B 85E3 E1A6 386B FC79 D411 9658 E804 4A3A A3D6

uid [ expired] Vivaldi Package Composer KEY05 <packager@vivaldi.com>

Remove the keys

With the following command:

# apt-key del 68AEAE71F9FA158703C1CBBC8D04CE49EFB20B23 B44B85E3E1A6386BFC79D4119658E8044A3AA3D6

Notice that we have passed the keys without spaces, ie: 68AE AE71 F9FA 1587 03C1 CBBC 8D04 CE49 EFB2 0B23 becomes 68AEAE71F9FA158703C1CBBC8D04CE49EFB20B23, and so on.

Going further

From the site https://help.vivaldi.com/desktop/install-update/manual-setup-vivaldi-linux-repositories/

After downloading a Linux package and installing it our Linux update repositories should be configured automatically for you to receive updates. However, if you wish you can pre-configure the repositories first and install Vivaldi from there. The following is a quick guide.

Import the public key (to allow for verification of the APT repository)

# wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | apt-key add –

If we want to check the key:

# apt-key list | grep -B4 vivaldi

pub rsa4096 2019-11-12 [SC] [expires: 2022-01-30]

790D 2E26 8F67 FE01 3B32 76D3 793F EB8B B697 35B2

uid [ unknown] Vivaldi Package Composer KEY06 <packager@vivaldi.com>

Add the repository

(pass this step, not our case, it has been added):

# add-apt-repository ‘deb https://repo.vivaldi.com/archive/deb/ stable main’

If we want to install Vivaldi:

# apt update && apt install vivaldi-stable

Leave a Comment