Apt-get key expired

From snippet wiki
Jump to navigation Jump to search

In case of an expired gpg key for 3rd party apt sites, you might get this warning:

Fehl:7 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release.gpg
  Die folgenden Signaturen waren ungültig: KEYEXPIRED 1515625755

Update your local key copy.

First check for the ID of the one expired key:

> apt-key list | grep expired
pub   4096R/A15703C6 2016-01-11 [expired: 2018-01-10]

Now you update that ID, let's say it was A15703C6

> apt-key adv --keyserver keys.gnupg.net --recv-keys A15703C6
Executing: /tmp/tmp.wUCzxnRMol/gpg.1.sh --keyserver
keys.gnupg.net
--recv-keys
A15703C6
gpg: requesting key A15703C6 from hkp server keys.gnupg.net
gpg: key A15703C6: "MongoDB 3.4 Release Signing Key <packaging@mongodb.com>" 1 new signature
gpg: Total number processed: 1
gpg:         new signatures: 1