Knowledge BaseMetric InsightsSystemOperating SystemsGPG Error when updating Debian or Metric Insights Tools

GPG Error when updating Debian or Metric Insights Tools

This error can come up when updating Debian or Metric Insights Tools.

ISSUE

Getting the following error when updating Debian or updating Metric Insights Tools (mi-deploy comp tools master):

W: GPG error: http://apt.datadoghq.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 226AE980C7A7DA52

How do I get the public key and finish the update?

RESOLUTION

The public key is actually listed in the error itself. To add the public key, run the following command with the public key specified at the end:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <public key>

In the example above, the command to run would look like:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 226AE980C7A7DA52

Once the key is added, can you rerun the update to Debian or Metric Insights Tools. Please note that the reason this key is needed is because the apt-get system has a new feature that guarantees the authenticity of servers when pulling updates from Debian sources.