I'm using Ubuntu 20.10 and I'm trying to get the latest signature-key and when I do that I get these lines:
root@kubernetes-worker:/home/jonteyh# curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2537 100 2537 0 0 14016 0 --:--:-- --:--:-- --:--:-- 14094
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
I get a warning message here that apt-key
is deprecated. How do I solve this?
Is there some way I should remove the file trusted.gpg.d
or edit it?
It looks like
apt-key
is deprecated from @Terrance. Read this link https://www.linuxuprising.com/2021/01/apt-key-is-deprecated-how-to-add.htmlIn that link it states that Debian will be ending
apt-key
as of April 2022. For nowapt-key
still works as shown in the output in the question where it statedOK
which means that the key was imported.In the future it is recommended to do the
signed-by
with the repositories that you are adding.All of this answer is from the link reworded.
First, download the key in question:
For ASCII type keys do it in this form:
or
For non-ASCII type keys do it in this form:
Or you can get your keys from a keyserver like so:
All keys will be stored in
/usr/share/keyrings/
folder. You can use those keys when you add your repo with thesigned-by
option to your sources.list file:Or you can add the
arch=amd64
in the same fashion:If this is helpful give thanks to @Terrance