Snippet/Techy: Fixing Debian Signatures were invalid – Key Expired

March 31st, 2017 by Richy B. Leave a reply »

If you are running Debian/Ubuntu and you are getting “The following signatures are invalid” when running apt-get commands (such as apt-get upgrade) and the error looks like:

Reading package lists... Done
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.mysql.com jessie InRelease: The following signatures were invalid: KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 KEYEXPIRED 1487236823

W: GPG error: http://nginx.org jessie InRelease: The following signatures were invalid: KEYEXPIRED 1471427554
W: Failed to fetch http://repo.mysql.com/apt/debian/dists/jessie/InRelease

W: Some index files failed to download. They have been ignored, or old ones used instead.

As root run:
for K in $(apt-key list | grep expired | cut -d'/' -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keys.gnupg.net $K; done

Source: http://serverfault.com/a/615362/12514

This post is over 6 months old.

This means that, despite my best intentions, it may no longer be accurate.

This blog holds over 12 years of archived content - during that time, I may have changed my opinion of something, technology will have advanced (and old "best standards" may no longer be the case), my technology "know how" has improved etc etc - it would probably take me a considerable amount of time to update all the archival entries: and defeat the point of keeping them anyway.

Please take these posts for what they are: a brief look into my past, my history, my journey and "caveat emptor".

Leave a Reply

gamy-dance
%d bloggers like this: