What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux

What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux

Hello Geeky, so today we are focusing on What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux. So please read this tutorial carefully so you may comprehend it in a better helpful way.

Guide: What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux

When you try to add an APT storage key using the apt-key on Debian, Ubuntu and Linux distributions based on the following, you will see the following message: “Warning: the apt-key has been deleted. Manage key files in trusted.gpg.d instead (see apt-key (8)) ”.

The apt-key human page mentions that “the use of the apt-key is limited, except for the use of the apt-key del in the browser scripts to remove the existing keys from the main key”. What’s more, “apt-key will be running in Debian 11 and Ubuntu 22.04.”

The reason for this change is that when adding an OpenPGP key used to sign the APT repository to /etc/apt/trusted.gpg or /etc/apt/trusted.gpg.d, the key is relied upon by APT on all others. configured repositories on a system that does not have a registry option (see below), especially Debian / Ubuntu official repositories. As a result, any unofficial APT repository that has your registry key added to /etc/apt/trusted.gpg or /etc/apt/trusted.gpg.d can replace any package on the system. So this change is for security reasons (your security).

It is also worth noting that while the apt-key message says to “manage keyring files in trusted.gpg.d instead”, wiki Debian says otherwise. That is because adding OpenPGP keys to /etc/apt/trusted.gpg and /etc/apt/trusted.gpg.d is safe as well, as mentioned above.

You can continue to use the apt-key for now as it works. However, it would be a good idea to start switching to using the approved option as described below, especially if you maintain a third-party storage.

So what is the correct, secure way of installing third-party (unauthorized) repositories and their OpenPGP registry keys on Debian, Ubuntu, and Linux distributions based on these, such as Linux Mint, Pop! _OS, Elementary OS etc, to replace deprecated apt-key?

1. Record the APT storage key

According to the Debian wiki, the key should record over HTTPS to a location that can be written by root only, for example / usr / share / keyrings. The key name should have a short name describing the repository, followed by typing. For example if the repository is called myrepository, the key file should be named myrepository-archive-keyring.gpg.

The OpenPGP key file can be ascii-armed or not. To verify whether a key file is ascii-armored, download the key file and execute this command (note that key extensions can be .gpg, .asc, .key, and maybe others):

.gpg file If the result of this command is similar to the following, then the key is ascii-armored:

repo-key.gpg: PGP public key block Block-Key (old) That being said, this is how to well, and record securely and add a storage registry key to your system:

For OpenPGP keys of ascii armor

To download using the wget and add an OpenPGP key type to your system, use:

wget -O- | gpg –dearmor | sudo tee /usr/share/keyrings/-archive-keyring.gpg

What does everything in this order do / mean:

wget download key from https://example.com/key/repo-key.gpg and export key to stdout (-O-). Replace the URL here with the URL of the key you want to download and add to your program gpg –dearmor: gpg command in OpenPGP encryption and registry application; its – dearmor option unpacks inputs from an OpenPGP ASCII armor sudo tee /usr/share/keyrings/-archive-keyring.gpg: as super user (sudo), read the standard input, which in this case is the result provided by gpg –dearmor, and write this to the /usr/share/keyrings/-archive-keyring.gpg file. Replace the name with the description name for the storage key you are adding

Faq

Guide about What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux


In this guide, we told you about the What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux; please read all steps above so that you understand What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux in case if you need any assistance from us, then contact us.

How this tutorial or guide assisting you?


So in this guide, we discuss the What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux, which undoubtedly benefits you.




Final note

I hope you like the guide What is the solution of ‘apt-key is deprecated’ Warning Debian 11 or Kali Linux. In case if you have any queries regards this article/tutorial you may ask us. Also, please share your love by sharing this article with your friends and family.

Trickbugs: Get the latest Trick and Tips
Logo
Enable registration in settings - general