deb 命令中的signed-by 选项是什么?

ikh*_*vjs 11 package-management apt software-sources

我尝试gcloud CLI在我的 Linux 中安装,并按照此处的文档进行操作。

从安装第 1 部分开始:

添加 gcloud CLI 分发 URI 作为包源。如果您的发行版支持签名选项,请运行以下命令:

 echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
Run Code Online (Sandbox Code Playgroud)

如果您的发行版不支持签名选项,请运行以下命令:

echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
Run Code Online (Sandbox Code Playgroud)

我不明白该signed-by选项在文档中的含义,并且在 中找不到任何相关信息Ubuntu Documentation

你能给我一些建议/提示吗?谢谢。

注意:我在 Ubuntu v20 中使用 WSL2

mur*_*uru 14

联机sources.list帮助页描述了此选项:

\n
\xc2\xb7  Signed-By (signed-by) is an option to require a repository to pass apt-secure(8)\n   verification with a certain set of keys rather than all trusted keys apt has\n   configured. It is specified as a list of absolute paths to keyring files (have to be\n   accessible and readable for the _apt system user, so ensure everyone has\n   read-permissions on the file) and fingerprints of keys to select from these keyrings. [...]\n
Run Code Online (Sandbox Code Playgroud)\n

(完整描述中有更多详细信息。)

\n

您可以通过查找signed-byin来检查您的特定版本man 5 sources.list。所有当前版本的 Ubuntu 都支持此选项。它是在 apt 1.1 中添加的,Ubuntu 16.04 有 1.2.x,因此任何高于 16.04 的版本都将支持它。

\n