{"id":9656,"date":"2022-09-25T10:31:51","date_gmt":"2022-09-25T08:31:51","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=9656"},"modified":"2022-09-25T10:31:51","modified_gmt":"2022-09-25T08:31:51","slug":"fix-missing-gpg-key-apt-repository-errors-no_pubkey","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2022\/09\/25\/fix-missing-gpg-key-apt-repository-errors-no_pubkey\/","title":{"rendered":"Fix Missing GPG Key Apt Repository Errors (NO_PUBKEY)"},"content":{"rendered":"<blockquote><p>You might see a missing public GPG key error (&#8220;NO_PUBKEY&#8221;) on Debian, Ubuntu or Linux Mint when running apt update \/ apt-get update. This can happen when you add a repository, and you forget to add its public key, or maybe there was a temporary key server error when trying to import the GPG key.<\/p><\/blockquote>\n<p>Source: <em><a href=\"https:\/\/www.linuxuprising.com\/2019\/06\/fix-missing-gpg-key-apt-repository.html\">Fix Missing GPG Key Apt Repository Errors (NO_PUBKEY) &#8211; Linux Uprising Blog<\/a><\/em><\/p>\n<p>Quick&#8217;n&#8217;dirty solution:<\/p>\n<p><code class=\"\" data-line=\"\">sudo apt-key adv --keyserver keyserver.ubuntu.com  --recv-keys THE_MISSING_KEY_HERE<\/code><\/p>\n<p><code class=\"\" data-line=\"\">sudo<br \/>\n apt update 2&gt;&amp;1 1&gt;\/dev\/null | sed -ne &#039;s\/.&lt;em&gt;NO_PUBKEY \/\/p&#039; |<br \/>\nwhile read key; do if ! [[ ${keys[&lt;\/em&gt;]} =~ &quot;$key&quot; ]]; then sudo apt-key<br \/>\nadv --keyserver keyserver.ubuntu.com --recv-keys &quot;$key&quot;; keys+=(&quot;$key&quot;);<br \/>\n fi; done<\/code><\/p>\n<p>Yes, I know apt-key is being deprecated&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">You might see a missing public GPG key error (&#8220;NO_PUBKEY&#8221;) on Debian, Ubuntu or Linux Mint when running apt update \/ apt-get update. This can happen when you add a repository, and you forget to add its public key, or maybe there was a temporary key server error when trying to import the GPG key.&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2022\/09\/25\/fix-missing-gpg-key-apt-repository-errors-no_pubkey\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[73,278,117],"tags":[],"class_list":["post-9656","post","type-post","status-publish","format-standard","hentry","category-debian","category-tricks","category-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2vK","jetpack-related-posts":[{"id":6905,"url":"https:\/\/monodes.com\/predaelli\/2020\/03\/14\/jitsi-installazione-su-vps\/","url_meta":{"origin":9656,"position":0},"title":"Jitsi-installazione-su-vps","author":"Paolo Redaelli","date":"2020-03-14","format":false,"excerpt":"Software libero a scuola\/Jitsi-installazione-su-vps Da Wikibooks, manuali e libri di testo liberi. Lo riporto qui solo per comodit\u00e0, ringraziando gli autori della pagina ma soprattutto gli sviluppatori di Meet Jitsi, programma libero quantomai prezioso in questo periodo di CoronaVirus Installazione del software open-source Jitsi-Meet su proprio server Linux. INSTALLAZIONE JITSI\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3717,"url":"https:\/\/monodes.com\/predaelli\/2018\/01\/28\/how-to-install-skype-for-linux-beta-on-debian-9-stretch-linuxbabe-com\/","url_meta":{"origin":9656,"position":1},"title":"How to Install Skype for Linux Beta on Debian 9 Stretch &#8211; LinuxBabe.Com","author":"Paolo Redaelli","date":"2018-01-28","format":false,"excerpt":"How to Install Skype for Linux Beta on Debian 9 Stretch - LinuxBabe.Com Skype for Linux beta 5.3 was released on May 31, 2017. It is a proprietary software, built on the web-based Skype client. This tutorial is going to show you how to install Skype on Debian 9 Stretch\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13841,"url":"https:\/\/monodes.com\/predaelli\/2025\/08\/12\/some-sources-can-be-modernized-run-apt-modernize-sources-to-do-so\/","url_meta":{"origin":9656,"position":2},"title":"Some sources can be modernized. Run \u2018apt modernize-sources\u2019 to do so","author":"Paolo Redaelli","date":"2025-08-12","format":false,"excerpt":"Thanks to Alan Pope that explained so clearly the Run \u2018apt modernize-sources\u2019 to do so issue at discourse.ubuntu.com: The notice \u201cSome sources can be modernized. Run \u2018apt modernize-sources\u2019 to do so\u201d appears because your Ubuntu system has detected software repository configurations using the older, traditional format (.list files, typically \/etc\/apt\/sources.list\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2443,"url":"https:\/\/monodes.com\/predaelli\/2017\/05\/09\/building-a-ceph-cluster-on-raspberry-pi\/","url_meta":{"origin":9656,"position":3},"title":"Building a Ceph Cluster on Raspberry Pi","author":"Paolo Redaelli","date":"2017-05-09","format":"link","excerpt":"Building a Ceph Cluster on Raspberry Pi - Bryan Apperson As the author clearly stated in a comment, this is more of a proof-of-concept for learning ceph, not for a real deploy as it's not meant to be cheaper per GB, but cheaper for initial cost: a \"3 figure cost\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":659,"url":"https:\/\/monodes.com\/predaelli\/2015\/09\/18\/moving-a-gpg-key-privately-short-circuit-synapse\/","url_meta":{"origin":9656,"position":4},"title":"Moving a GPG Key (Privately) | Short-Circuit Synapse","author":"Paolo Redaelli","date":"2015-09-18","format":false,"excerpt":"Sometimes I have to move my GnuPG key between computers for some reason, and although GnuPG does have features to export your private key, they are not as well documented, probably out of choice to discourage their use, as they can be a security issue. I have developed the following\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11545,"url":"https:\/\/monodes.com\/predaelli\/2024\/03\/31\/pare-mi-sia-andata-bene\/","url_meta":{"origin":9656,"position":5},"title":"Pare mi sia andata bene","author":"Paolo Redaelli","date":"2024-03-31","format":false,"excerpt":"sudo apt purge xz-utils [sudo] password di paolo: Lettura elenco dei pacchetti... Fatto Generazione albero delle dipendenze... Fatto Lettura informazioni sullo stato... Fatto I seguenti pacchetti sono stati installati automaticamente e non sono pi\u00f9 richiesti: libsensors-config libsensors5 Usare \"sudo apt autoremove\" per rimuoverli. I seguenti pacchetti saranno RIMOSSI: sysstat* xz-utils*\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=9656"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9656\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=9656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=9656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=9656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}