Monday, February 26, 2018

apt - How to handle phalconphp GPG issue



I'm trying to update my nodejs installation, and phalconphp is getting in the way. When I run apt-get update, I get this complaint




Err:13 https://packagecloud.io/phalcon/stable/ubuntu xenial InRelease                                        
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4166E80CDCF8B31B


Following the advice of several threads (such as this one), I've tried to fetch the GPG key:



sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 4166E80CDCF8B31B


Results in




gpg: requesting key DCF8B31B from hkp server keyserver.ubuntu.com
gpgkeys: key 4166E80CDCF8B31B not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: key not found
gpg: keyserver communications error: bad public key
gpg: keyserver receive failed: bad public key



So how do I figure out which server should have the GPG key?



I got it by re-running the phalcon install script



curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash


This script has the URL to the correct key server and runs apt-get add on it (relevant portions here, feel free to read through the entire script though)



gpg_key_url="https://packagecloud.io/phalcon/stable/gpgkey"

# ...
curl -L "${gpg_key_url}" 2> /dev/null | apt-key add - &>/dev/null

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...