Fix Google app public key error or GPG error in linux

When executing the apt-get update in ubuntu OS command, You may get the public key Error message. Below we will solve public key error message while updating the google pagespeed .

[email protected]:/$ sudo apt update
 Ign:1 http://dl.google.com/linux/mod-pagespeed/deb stable InRelease
Get:2 http://dl.google.com/linux/mod-pagespeed/deb stable Release [2154 B]
Get:3 http://dl.google.com/linux/mod-pagespeed/deb stable Release.gpg [819 B]
Ign:3 http://dl.google.com/linux/mod-pagespeed/deb stable Release.gpg
Hit:4 http://mirrors.digitalocean.com/ubuntu bionic InRelease
Get:5 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:7 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:8 http://mirrors.digitalocean.com/ubuntu bionic-updates/main amd64 Packages [658 kB]
Get:9 http://mirrors.digitalocean.com/ubuntu bionic-updates/universe amd64 Packages [958 kB]
Reading package lists… Done
W: GPG error: http://dl.google.com/linux/mod-pagespeed/deb stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
E: The repository ‘http://dl.google.com/linux/mod-pagespeed/deb stable Release’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

This type of issue comes when the application public key (or signing keY) do not match with system stored key.

Google signs its packages with GPG keys so that you (and your package manager) can “verify product updates”. When a GPG expires, changes, or is otherwise missing from your system your package manager will display an error, which is precisely what the mono-spaced junk above is.

Just downloading the key and installing like in below command will solve you issue.

[email protected]:/$ wget -q -O – https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add –
[email protected]:/$ sudo apt update

 Get:2 http://dl.google.com/linux/mod-pagespeed/deb stable Release [2154 B]                                     
Get:3 http://dl.google.com/linux/mod-pagespeed/deb stable Release.gpg [819 B]
Get:4 http://dl.google.com/linux/mod-pagespeed/deb stable/main amd64 Packages [2043 B]
Hit:5 http://mirrors.digitalocean.com/ubuntu bionic InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:7 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease
Hit:8 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease
Fetched 5016 B in 1s (6288 B/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done

, ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *