apt-key 已弃用。无需安装 gpg 即可安装密钥?

apt-key 已弃用。无需安装 gpg 即可安装密钥?

我知道 apt-key 已被弃用,并想像kubectl这样安装:

docker run -it ubuntu:22.04 bash

apt update; apt install gpg curl sudo

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.

apt update

这项工作(相关Kubernetes 问题

但是:有没有办法无需安装就能完成同样的操作gpg

相关内容