You may encounter an error when running apt-get update on your Debian / Ubuntu based Linux server:
Fetched 70.9 kB in 6s (11.8 kB/s)
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: https://packages.sury.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Failed to fetch https://packages.sury.org/php/dists/jessie/InRelease
W: Some index files failed to download. They have been ignored, or old ones used instead.
This repository is maintained by Ondrej to host his PHP Debian / Ubuntu Packages.
In order to resolve the error and successfully fetch the updated list you should simply add the new APT GPG signing-key to your trusted keyring by running the following CLI commands:
sudo apt-get -y install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt-get update
Alternatively you could run Ondrej’s bash script: