GPG error with public key

When I would run

sudo apt-get update

I would get and error that made using apt-get useless:

Fetched 164 kB in 7s (20.9 kB/s) 
Reading package lists... Done
W: GPG error: Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 977C43A8BA684223

My first attempt came from the top search result so I figured it would work, but it did not.

gpg --keyserver --recv-keys 977C43A8BA684223

gpg: requesting key BA684223 from hkp server
?: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: No such file or directory
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

I knew I was onto something but that URL seemed like it would not work. I clicked another link and I found the same suggestion but with a new URL for the key and it was successful:

sudo apt-key adv --recv-keys --keyserver 977C43A8BA684223

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.hm7xQN1vkC --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver 977C43A8BA684223
gpg: requesting key BA684223 from hkp server
gpg: key BA684223: public key "isv:ownCloud OBS Project <>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1

If you are looking at this page and this does not work, look for another key server that hosts the key you are looking for. The goal of of course is for something like this:

sudo apt-get update

Fetched 164 kB in 5s (28.0 kB/s)
Reading package lists... Done


This entry was posted in How-To, Linux and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s