Following recipe will help to add a public key to ‘apt’ for repositories not already included in /etc/apt/sources.list. If you get an error ‘NO_PUBKEY XXXXXXXXXXXX’ , just use XXXXXXXXXXXX public key name in the following code.
gpg –keyserver hkp://subkeys.pgp.net –recv-keys XXXXXXXXXXXXXXXXX
sudo gpg –export –armor “XXXXXXXXXXXXXXXXXXX” | sudo apt-key add -
sudo . . . → Read More: Adding Public Key For Ubuntu Repositories