-1

I am getting the following error while running apt-get update on all of the servers.

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.
Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AA6247928553
W: Some index files failed to download, they have been ignored, or old ones used instead.

The solutions available are:

 To login into each of the server and run the following command to import the gpg key for that repo.

 sudo gpg --keyserver hkp://subkeys.pgp.net --recv-keys 8B48AA6247928553
 sudo gpg --export --armor 8B48AA6247928553 | sudo apt-key add - 

But this requires logging into all of the individual servers and run the above two commands.

I am looking for a way to correct by working on apt-repo server. Is there any way to do that.

pradeepchhetri
  • 2,698
  • 6
  • 37
  • 47

1 Answers1

0

The correct way to add gpg keys for apt repositories is using apt-key. You must trust the issuer of the key, otherwise your server will be likely compromised.

wget -qO - http://some.server/archive.key | sudo apt-key add -

Or, if you downloaded the key:

sudo apt-key add key.gpg

If you are using Ubuntu, you can use add-apt-repository:

sudo add-apt-repository http://extras.ubuntu.com/ubuntu main
Braiam
  • 642
  • 4
  • 23