删除 Docker GPG 密钥

删除 Docker GPG 密钥

最近我想在我的 kali 机器上安装 Docker。我在 Kali 中安装了错误的(Ubuntu)版本。

我做了一个curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

如果我想要的apt-get update话请给我留言

$ sudo apt-get update                                                                             1 ⨯
Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease                                          
Hit:3 http://repository.spotify.com stable InRelease                                                   
Hit:4 https://linux.teamviewer.com/deb stable InRelease                                                
Ign:5 https://download.docker.com/linux/ubuntu kali-rolling InRelease                                  
Err:6 https://download.docker.com/linux/ubuntu kali-rolling Release                                    
  404  Not Found [IP: 2600:9000:21b4:3000:3:db06:4200:93a1 443]
Hit:7 https://updates.signal.org/desktop/apt xenial InRelease                             
Hit:9 https://repo.protonvpn.com/debian stable InRelease            
Hit:8 https://mirror.anigil.com/kali kali-rolling InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu kali-rolling Release' does not have a Release file.
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.

我想删除 Docker GPG 密钥。我该怎么做?谢谢 :D

注意:我按照这个教程安装docker,然后才安装正确的版本

https://docs.docker.com/engine/install/ubuntu/

答案1

问题不在于 gpg 密钥,而在于您添加的 ppa — 导致这些错误。要解决该问题,您需要删除 ppa。

sudo rm /etc/apt/sources.list.d/docker.list
sudo apt update

如果您安装了正确的版本,您也可以手动从文件中删除它,从而减少出现任何错误的可能性。

sudo find /etc/apt -name '*.list' -exec grep -i 'download.docker.com' {} \; -print

将为您提供包含的文件download.docker.com,您可以从该文件中删除有问题的行。

相关内容