craig

1 min read - Posted 12 Jan 20

Solving the "The following signatures were invalid: KEYEXPIRED" apt-get update linux error

The Error

My travis CI pipeline builds randomly starting failing recently, with the following exception:

...
Reading package lists...
W: GPG error: http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1578250443
E: The repository 'http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 Release' is not signed.
The command "sudo apt update" failed and exited with 100 during 
...

The mongoDB certificates had expired!

The Solution

Luckily, I stumbled upon a simple, one-line command that updates all the expired keys from the ubuntu keyserver:

sudo apt-key list | \
 grep "expired: " | \
 sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \
 xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys

This command first lists all the keys in the sytem, then narrows this list down to only expired keys. The expired keys are then extracted and updated.

Thanks to Peter and dlopatin for this solution.

Created with Sketch.Content is"CC-BY-SA 4.0" licensed
Article On-chain
0 Comments
Related Articles
Minimum Viable Plasma - The Kyokan Implementation

The issues around scaling Ethereum to high-throughput production use cases are well known. There are many solutions to this problem in progress, from state channels to side chains, but an additional complexity is safely transferring transactions between the Ethereum mainchain and these other locations. Plasma is a framework proposed by Joseph Poon and Vitalik Buterin to address this, and a handful of projects rapidly emerged to try and implement this proposal. Following this was a post from Vita

Running a Pantheon Node in Java Integration Tests

The first problem you are likely to meet when attempting to write integration tests for your Java Ethereum application is that you need a running node to connect to for sending transactions. One option to overcome this is to run a node yourself manually in the background, but this becomes hard to manage if you want to run your tests in a CI pipeline, and forcing all contributors to you codebase to run a node manually is not ideal. Luckily theres a better way! Prerequisites A running Docker daemo