Amin Merati
Amin Merati

Reputation: 2281

GPG error (EXPKEYSIG) while on apt update on Ubuntu

I was trying to update the apt repository on Ubuntu by running:

$sudo apt update

And I get the following error:

W: An error occurred during the signature verification.
The repository is not updated and the previous index files will be used.
GPG error: https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/amd64 
InRelease: The following signatures were invalid: EXPKEYSIG 6ED91CA3AC1160CD NVIDIA CORPORATION (Open Source Projects) <[email protected]>
W: Failed to fetch https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/amd64/InRelease 
The following signatures were invalid: EXPKEYSIG 6ED91CA3AC1160CD NVIDIA CORPORATION (Open Source Projects) <[email protected]>

I googled this error and some blogs suggests to run

$sudo apt-key list

which I did and get:

pub   rsa4096 2016-06-24 [SC]
      AE09 FE4B BD22 3A84 B2CC  FCE3 F60F 4B3D 7FA2 AF80
uid           [ unknown] cudatools <[email protected]>

pub   rsa4096 2017-09-28 [SCE]
      C95B 321B 61E8 8C18 09C4  F759 DDCA E044 F796 ECB0
uid           [ unknown] NVIDIA CORPORATION (Open Source Projects) <[email protected]>

The following link How to solve expired key suggests to run the following command with EXPKEYSIG, but I get the following error:

$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 6ED91CA3AC1160CD
Executing: /tmp/apt-key-gpghome.A0899nj0Vo/gpg.1.sh --keyserver keys.gnupg.net --recv-keys 6ED91CA3AC1160CD
gpg: keyserver receive failed: No name

Really not sure how to resolve this? Any suggestion?

Thanks

Upvotes: 6

Views: 7340

Answers (2)

Vaibhav Jain
Vaibhav Jain

Reputation: 397

For resolve this issue :-

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

Upvotes: 0

andy kan
andy kan

Reputation: 212

For solve your problem:

  1. delete old key

    sudo apt-key del 6ED91CA3AC1160CD

  2. delete repository info:

    sudo rm /etc/apt/sources.list.d/nvidia-container-runtime.list

  3. reinit repository as write here https://nvidia.github.io/nvidia-container-runtime/

    curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey |
    sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list |
    sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list sudo apt-get update

Upvotes: 5

Related Questions