sudo apt-get update fails public key is not available: NO_PUBKEY, sudo gpg --keyserver pgpkeys.mit.edu --recv-key also fails

Ubuntu 18.04 For some time now the graphical GUI Software Updater would report

enter image description here

Then click ok would give me

enter image description here

Then click Install Now

it would report loading for a fraction of a second then close. I should have been suspicious, but ...

Well, today I tried

sudo apt-get update

and got the following error

Get:14 https://packagecloud.io/shiftkey/desktop/any any InRelease [23.2 kB] Err:14 https://packagecloud.io/shiftkey/desktop/any any InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7E65990E879472F Reading package lists... Done W: GPG error: https://packagecloud.io/shiftkey/desktop/any any InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7E65990E879472F E: The repository 'https://packagecloud.io/shiftkey/desktop/any any InRelease' is not signed.

askubuntu.com/questions/849919/fail-to-sudo-apt-get-update

suggests

sudo apt-get --allow-unauthenticated update

but this fails too.

fix-apt-get-update-the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available many more questions with same answer and more

suggests

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys xxxx

but this fails too "gpg: keyserver receive failed: No data".

Suggestions for what to do next would be appreciated.


Installation instructions

Run it in the terminal

curl -s `https://packagecloud.io/install/repositories/shiftkey/desktop/script.deb.sh | sudo bash`

enter image description here

Alternative option. This is the command that will automatically find and add the necessary security keys of the connected repositories:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com `sudo apt-get update 2>&1 | grep -o '[0-9A-Z]\{16\}$' | xargs`

If you look at the repository's webpage (https://packagecloud.io/shiftkey/desktop/), you'll find a button that leads you to the "Debian Installation Instructions" which tell you to download a script and execute it. Said script will pull the required GPG key from https://packagecloud.io/shiftkey/desktop/gpgkey and feed it into apt-key. Alternatively, look at https://github.com/shiftkey/desktop/#user-content-debianubuntu-distributions which lists the detailed manual steps.