Score:1

What is the signed-by option in deb command?

sy flag

I am new to Linux.

I try to install gcloud CLI in my Linux and I am following the documentation here.

From the installation part 1:

Add the gcloud CLI distribution URI as a package source. If your distribution supports the signed-by option, run the following command:

 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

If your distribution doesn't support the signed-by option, run the following command:

echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

I don't understand what the signed-by option means in the documentation.

Could you give me some advice/hints? Thanks.

Note: I am using WSL2 with Ubuntu v20

Lorenz Keel avatar
gr flag
Does this answer your question? [What commands (exactly) should replace the deprecated apt-key?](https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key)
Lorenz Keel avatar
gr flag
It's a consequence of the fact that the command `apt-key` is deprecated (but still supported in Ubutnu 21.10, don't know what will happen in Ubuntu 22.04). See link above.
ikhvjs avatar
sy flag
@LorenzKeel, Although the suggested question doesn't really answer my question, your comment and suggested question together lead me to the right direction for the answer. Thanks.
Score:1
us flag

The sources.list manpage describes this option:

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

(There's much more detail in the full description.)

You can check in your particular version for this by looking for signed-by in man 5 sources.list. All current versions of Ubuntu support this option. It was added in apt 1.1, and Ubuntu 16.04 had 1.2.x, so anything newer than 16.04 will support it.

ikhvjs avatar
sy flag
Thanks. That's what I want to know. I cannot find the documentation with the keywords `signed-by` and `ubuntu`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.