Mémo pour corriger la clé GPG invalide d’un repo
Exemple avec le repo Mongo 4 pour Ubuntu Focal.
Symptôme
|
1 2 3 4 5 6 7 8 9 10 |
$ sudo apt update ... Err:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease The following signatures were invalid: EXPKEYSIG 656408E390CFB1F5 MongoDB 4.4 Release Signing Key <packaging@mongodb.com> ... Reading package lists... Done W: GPG error: https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease: The following signatures were invalid: EXPKEYSIG 656408E390CFB1F5 MongoDB 4.4 Release Signing Key <packaging@mongodb.com> E: The repository 'https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease' is no longer signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. |
Correction
Supprimer et installer à nouveau la clé :
|
1 2 3 4 5 6 7 |
$ sudo apt-key del 656408E390CFB1F5 OK $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 656408E390CFB1F5 Executing: /tmp/apt-key-gpghome.3l157wC8fu/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 656408E390CFB1F5 gpg: key 656408E390CFB1F5: public key "MongoDB 4.4 Release Signing Key <packaging@mongodb.com>" imported gpg: Total number processed: 1 gpg: imported: 1 |