Score:0

I added a GPG key but it is not appearing in the key list

ru flag

I added a new GPG key using this command:

curl -fsSL https://pgp.mongodb.com/server-7.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
   --dearmor

The file is appearing in /usr/share/keyrings/mongodb-server-7.0.gpg but when I run sudo apt-key list, there is no entry for it, and it is giving an error while running apt update. How do I fix this?

muru avatar
us flag
Since you have already downloaded the key, you need to follow the part starting from "At this point, nothing has changed and apt doesn't know the key exists" in https://askubuntu.com/a/1307181/158442
khateeb avatar
ru flag
@muru, thanks that worked. Although my key is in `/usr/share/keyrings/` and not `/etc/apt/keyrings/`. Will this not be a problem?
muru avatar
us flag
It's not likely, but packages can install files in `/usr/share`, so your keyring might conflict if some package somehow adds a file with the exact same path, but again, not likely to happen.
I sit in a Tesla and translated this thread with Ai:

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.