Invalid public key for CUDA apt repository

same issue here

1 Like

oem@JH:~$ sudo dpkg -i cuda-repo-ubuntu2004-11-6-local_11.6.2-510.47.03-1_amd64.deb
[sudo] password for oem:
Selecting previously unselected package cuda-repo-ubuntu2004-11-6-local.
(Reading database … 275893 files and directories currently installed.)
Preparing to unpack cuda-repo-ubuntu2004-11-6-local_11.6.2-510.47.03-1_amd64.deb …
Unpacking cuda-repo-ubuntu2004-11-6-local (11.6.2-510.47.03-1) …
Setting up cuda-repo-ubuntu2004-11-6-local (11.6.2-510.47.03-1) …
oem@JH:~$ sudo apt-key add /var/cuda-repo-ubuntu2004-11-6-local/7fa2af80.pub
OK
oem@JH:~$ sudo apt-get update
Get:1 file:/var/cuda-repo-ubuntu2004-11-1-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu2004-11-1-local InRelease
Get:2 file:/var/cuda-repo-ubuntu2004-11-6-local InRelease
Ign:2 file:/var/cuda-repo-ubuntu2004-11-6-local InRelease
Get:3 file:/var/cuda-repo-ubuntu2004-11-1-local Release [564 B]
Get:4 file:/var/cuda-repo-ubuntu2004-11-6-local Release [564 B]
Get:3 file:/var/cuda-repo-ubuntu2004-11-1-local Release [564 B]
Get:4 file:/var/cuda-repo-ubuntu2004-11-6-local Release [564 B]
Get:5 file:/var/cuda-repo-ubuntu2004-11-6-local Release.gpg [836 B]
Get:5 file:/var/cuda-repo-ubuntu2004-11-6-local Release.gpg [836 B]
Get:6 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Get:7 Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease [1,575 B]
Hit:8 Index of /repos/code/ stable InRelease
Hit:9 Index of /ubuntu focal InRelease
Get:11 Index of /ubuntu focal-updates InRelease [114 kB]
Hit:12 Index of /graphics-drivers/ppa/ubuntu focal InRelease
Get:13 file:/var/cuda-repo-ubuntu2004-11-6-local Packages [34.1 kB]
Get:14 Index of /ubuntu focal-security InRelease [114 kB]
Hit:15 Index of linux/ubuntu/ focal InRelease
Get:16 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,092 B]
Err:7 Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Get:17 Index of /ubuntu focal-backports InRelease [108 kB]
Get:18 Index of /ubuntu focal-updates/main amd64 Packages [1,750 kB]
Get:19 Index of /ubuntu focal-security/main i386 Packages [428 kB]
Get:20 Index of /ubuntu focal-updates/main i386 Packages [637 kB]
Get:21 Index of /ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]
Get:22 Index of /ubuntu focal-updates/universe i386 Packages [678 kB]
Get:23 Index of /ubuntu focal-updates/universe amd64 Packages [920 kB]
Get:24 Index of /ubuntu focal-security/main amd64 Packages [1,422 kB]
Get:25 Index of /ubuntu focal-updates/universe amd64 DEP-11 Metadata [390 kB]
Get:26 Index of /ubuntu focal-updates/universe amd64 c-n-f Metadata [20.6 kB]
Get:27 Index of /ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:28 Index of /ubuntu focal-backports/main Translation-en [10.2 kB]
Get:29 Index of /ubuntu focal-backports/main amd64 DEP-11 Metadata [7,984 B]
Get:30 Index of /ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.8 kB]
Get:31 Index of /ubuntu focal-security/main Translation-en [246 kB]
Get:32 Index of /ubuntu focal-security/main amd64 DEP-11 Metadata [40.7 kB]
Get:33 Index of /ubuntu focal-security/main amd64 c-n-f Metadata [10.1 kB]
Get:34 Index of /ubuntu focal-security/universe amd64 DEP-11 Metadata [66.2 kB]
Get:35 Index of /ubuntu focal-security/universe amd64 c-n-f Metadata [14.4 kB]
Get:36 Index of /ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Reading package lists… Done
W: GPG error: Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository ‘Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
oem@JH:~$ gpg --recv-keys A4B469963BF863CC
gpg: keyserver receive failed: No data

1 Like

Same issue

Same error here, for a 11.3.1 cudnn docker image. Can’t do apt-get update.

Has anyone found a solution yet?

Same problem here, just started today.

W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease' is not signed.

1 Like

Looks like nvidia did rotate the public keys and asking to update it accordingly. Not sure when the Docker images(For ex: nvidia/cuda:11.2.1-base-ubuntu18.04) maintained by nvidia will be updated
Some info here

We’re in the process of updating the Docker images and Dockerfiles, but I don’t have an ETA at hand for any specific container image.

1 Like

The following works in pytorch docker (cuda-keyring_1.0-1_all.deb file was downloaded with wget outside of docker first):

from pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel as builder

COPY ./cuda-keyring_1.0-1_all.deb cuda-keyring_1.0-1_all.deb

RUN rm /etc/apt/sources.list.d/cuda.list
&& rm /etc/apt/sources.list.d/nvidia-ml.list
&& dpkg -i cuda-keyring_1.0-1_all.deb

RUN apt-get update

This worked for me, thank you! Key was indeed to download the key outside of docker.

1 Like

Same problem for me, just started today. Cannot do apt-get update :(

W: GPG error: Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

E: The repository ‘Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease’ is not signed.

1 Like

Adding the following seems to fix it:
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub

13 Likes

Unless RUN is an alias to sudo your solution would be better stated as;

$ sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
$ sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub

Though I suspect that second line is only if you have machine learning stuff.

24 Likes

OK it worked

It worked, thank you! I only ended up needing first command to get my stuff working again!

Just wanted to pull your coat about the fact that the post in the Announcements category references a directory tree on the server for use with Ubuntu 22.04 “The Jammy Jellyfish”, however no such path is being served.

1 Like

I am facing same issue as well. I started NVIDIA VM in azure and not able to run apt update because of publickey error. Also tried running sudo apt-key adv --recv-keys --keyserver keys.gnupg.net A4B469963BF863CC to get keys but its giving rror for No data… How do i fix it ?
I am using ubuntu 20.04

Same issue here:

GPG error: Index of /compute/cuda/repos/ubuntu2004/x86_64 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

1 Like

Found myself in a Catch 22 using Docker container nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
This works:
RUN apt-key del 7fa2af80

But, you still can’t run apt update after that, because the container still holds the invalidated nvidia repos, so I had to:

RUN apt-key del 7fa2af80 \
    && rm /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/cuda.list

After that you can update and apt install wget, to do:

RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb \
    && dpkg -i cuda-keyring_1.0-1_all.deb

All was fine for me after that! So I believe someone needs to update the containers themselves for this to start working again. Hope this helps someone.

4 Likes

Hey. I have the same issue without root privileges. How to tackle this issue without sudo?

I am trying to build and store a singularity-container on sylabs. I am using clustersystem were I don’t have any privileges. Thanks

singularity build --remote library://A/B/C.sif:latest C.def

Reading package lists…
W: GPG error: Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository ‘REPOLINK InRelease’ is not signed.
FATAL: While performing build: while running engine: exit status 100

RUN (all capitals) is typically the way the docker run command is written. Depending on the state during the container build the command could be executed as root or another user.

This is was my fix:

RUN apt-key del 7fa2af80 \
    && apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub \
    && apt-get update \
    && apt-get install -y libsm6 libgl1-mesa-glx libxext6 libfontconfig1 libxrender1 \
    && rm -rf /var/lib/apt/lists/*    && rm -rf /var/lib/apt/lists/*

Adjust the second to last line where additional packages are installed to reflect your Dockerfile.

1 Like