NO_PUBKEY 793FEB8BB69735B2. Vivaldi repository GPG error. The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 793FEB8BB69735B2

Debian Bullseye 11 and Ubuntu 22.04 will no longer use apt-key (apt-key deprecated) to manage the list of keys used by apt to authenticate packages. Therefore if you are using debian 10 testing (Bullseye) the standard procedure to import the Vivaldi specific repository key using apt-key will inevitably lead to the title warning.

# Import the Vivaldi repository signing key:
wget -qO- https://repo.vivaldi.com/stable/linux_signing_key.pub | sudo apt-key add -

To avoid the warning we can take the repository key in plain text format, convert it into binary gpg format and add it to the specific apt directory /etc/apt/trusted.gpg.d

curl -fsSL https://repo.vivaldi.com/stable/linux_signing_key.pub | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/bullseye-vivaldi pgdg.gpg > /dev/null


we can split the command into several lines for a better reading: :

curl -fsSL https://repo.vivaldi.com/stable/linux_signing_key.pub | 
gpg --dearmor | 
sudo tee /etc/apt/trusted.gpg.d/bullseye-vivaldi.gpg > 
/dev/null 
  • curl downloads the pub key ( plain text type ) of the Vivaldi apt repository
  • gpg –dearmor create a bynary gpg key
  • tee reads the standard input and writes it both as standard output and to the file ( /etc/apt/trusted.gpg.d/bullseye-vivaldi.gpg )
  • /dev/null avoid displaying the binary key on standard output

The Vivaldi keyring file in the trusted.gpg.d directory ( as desidered )

You can also use wget to download the key

wget --quiet -O - https://repo.vivaldi.com/stable/linux_signing_key.pub | 
gpg --dearmor | 
sudo tee /etc/apt/trusted.gpg.d/bullseye-pgdg.gpg > 
/dev/null 

To view the key in plain text just use the first part of the command:

wget -O- https://repo.vivaldi.com/stable/linux_signing_key.pub

-----BEGIN PGP PUBLIC KEY BLOCK----- mQINBF3Kxh8BEACWWRSZLDXqxs+iqzdFv/rNOaHMmOm740ZLa1rovnJXhJ6ygcyp dP+FNGjqz1s+FfKhrUuhnr8jKzAsIXZrEN/bD3M4qdKmb+I8UCvJqOWoDSXm2Ksl uTgI5AOwgloxYFZ6SIOHe6Du1NDJh5XR/tx+ts8WZ8OstjrqCLADxmh+hGIIzJ+G 
...
...

below it is the warning about Vivaldi’s apt repository in debian bullseys (debian 10 testing) using apt-key. The warning that occurs when launching apt update is reported in full..

...
...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.vivaldi.com/stable/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 793FEB8BB69735B2
W: Failed to fetch http://repo.vivaldi.com/stable/deb/dists/stable/Release.gpg  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 793FEB8BB69735B2
W: Some index files failed to download. They have been ignored, or old ones used instead.
...
...

The warning is also preceded by the following error line :

Err:11 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 793FEB8BB69735B2

Risorse:

gpg: failed to start the dirmngr ‘/usr/bin/dirmngr’: No such file or directory. : No dirmngr

In Debian Stretch quando si aggiunge una chiave per il download sicuro dei pacchetti da un repository si può incorrere nell’errore  : No dirmngr

# apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
Executing: /tmp/apt-key-gpghome.XUff8gqJyV/gpg.1.sh --fetch-keys http://repos.codelite.org/CodeLite.asc
gpg: requesting key from 'http://repos.codelite.org/CodeLite.asc'
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.XUff8gqJyV/S.dirmngr' failed: No such file or directory
gpg: WARNING: unable to fetch URI http://repos.codelite.org/CodeLite.asc: No dirmngr

Questo si verifica perchè Debian 9 è fornito con una installazione minimale di gnupg e perchè sia pienamente funzionante è necessario scaricare il pacchetto dirmngr per le operazioni di download dei certificati.

dirmngr si installa da terminale con

apt-get install dirmngr --install-recommends

A questo il precedente comando per l’installazione della key si completa senza problemi.

apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
Executing: /tmp/apt-key-gpghome.VEurGEDQ59/gpg.1.sh --fetch-keys http://repos.codelite.org/CodeLite.asc
gpg: requesting key from 'http://repos.codelite.org/CodeLite.asc'
gpg: key 6856E1DB1AC82609: public key "David Hart (codelite key) <david@codelite.co.uk>" imported
gpg: Total number processed: 1
gpg: imported: 1

Risorse:

Ubuntu troubleshooting