1

I hope that I'm not running afoul of duplication policies on account of this: Gpgkeys can't be retrieved, but I tried everything mentioned in that post to no avail. At this point I'm expecting that there's a firewall and/or proxy issue that is blocking the typical solutions, and I'm trying to figure out if there's a different way to address my problem.

What I'm fundamentally trying to do is update my version of PostgreSQL from version 9.5 to 10, but in order to do so I need to update my repositories. Here's the output of that:

ava@3b97b310abf0:~/workspace/scripts/PostGISSetup$ sudo apt update
Get:1 http://packages.ros.org/ros/ubuntu xenial InRelease [4,678 B]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]                            
Get:3 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial InRelease [23.8 kB]           
Err:1 http://packages.ros.org/ros/ubuntu xenial InRelease                                               
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
Err:3 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 089EBE08314DF160
Hit:4 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Reading package lists... Done     
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ros.org/ros/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
W: GPG error: http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 089EBE08314DF160
E: The repository 'http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial InRelease' 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.

Research on this and other forums tell me that this indicates that I have two public keys that have expired and need to be updated, which can be accomplished using the apt-key command. Unfortunately, that does not appear to work for me, either:

ava@3b97b310abf0:~/workspace/scripts/PostGISSetup$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F42ED6FBAB17C654 089EBE08314DF160
Executing: /tmp/tmp.s8hITSbMYH/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv-keys
F42ED6FBAB17C654
089EBE08314DF160
gpg: requesting key AB17C654 from hkp server keyserver.ubuntu.com
gpg: requesting key 314DF160 from hkp server keyserver.ubuntu.com
gpgkeys: key F42ED6FBAB17C654 can't be retrieved
gpgkeys: key 089EBE08314DF160 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver helper general error
gpg: keyserver communications error: unknown pubkey algorithm
gpg: keyserver receive failed: unknown pubkey algorithm

I've found three major errors related to running this command: connection failure, server timing out, and this "can't be retrieved." Because this is not the first two, I'm assuming that my issue is not one of being unable to establish a connection with the key server in the first place, but rather of being able to get the response back. In the thread linked above, another user indicated that his issue was related to a specific port being blocked.

This is where the crux of my issue is. I'm behind a firewall and a proxy that I have no control over and whose configuration changes with some regularity and no notification to me. As a result, I'm thinking at this point that it would be better to separate out from the package management system altogether and manually update the software that I need. Is that a reasonable solution? How would I go about removing the problematic entries from apt and doing so? Is there a better option that I'm missing? Thanks for the help!

1 Answer 1

0

I solved this by following the instructions on this page : https://www.linuxuprising.com/2019/06/fix-missing-gpg-key-apt-repository.html and running the script :

sudo apt update 2>&1 1>/dev/null | sed -ne 's/.*NO_PUBKEY //p' | while read key; do if ! [[ ${keys[*]} =~ "$key" ]]; then sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; keys+=("$key"); fi; done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .