Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 3845  / 2 Years ago, mon, january 31, 2022, 7:31:16

When I download updates or installing new software I get these warnings that I have no public keys. This just appeared one day and I didn't remove/add something to create this.




Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192




I have tried: sudo apt-key update and it worked for some keys, but others are still missing, I need to add them.



I need help with adding the new keys and the address to all the keys. Those that aren't in Ubuntu and launchpad.


More From » 11.04

 Answers
5

Getting the Keys, Part 1



The program addgpg-apt - which is mine - will only work if the keys are on the Ubuntu keyserver, unless you specifically specify what key server you are trying to get the key from. It does not go out to the internet and find what key server the PGP key is on.



Using the following command:



sudo apt-get update | grep "NO_PUBKEY" | awk '{ system("addgpg-apt "$21) }'


Will systematically go through each line of output and send each key to addgpg-apt program. addgpg-apt will attempt to get the key from the Ubuntu keyservers.



For ubuntu.com or launchpad.net items, it will work without issue. For keys for other GPG Keyservers, you'll need to find the locations of those keys in their respective keyserver, then use addgpg-apt with the --keyserver flag for each:



addgpg-apt --keyserver <keyserver> <keyid>


That will then take the keys and place them into your APT keyring.



The addgpg-apt program is available via PPA





If the first command fails, try this one:



sudo apt-get update | grep "NO_PUBKEY" | awk '{ print $21) }' | xargs addgpg-apt


This will perform the same action as above, only operates differently.



Getting the Keys, Part 2



I recommend checking the site(s) for the other non-Ubuntu and non-Launchpad repositories for the PGP keys, as they more than likely are listed there. After you find each one, you can run addgpg-apt --keyserver <keyserver> <keyid> and it will download from those repositories' key servers.


[#43998] Monday, January 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anxietunnel

Total Points: 66
Total Questions: 120
Total Answers: 115

Location: Norway
Member since Sat, Mar 4, 2023
1 Year ago
;