How to apt-update when apt is not accepting the repository?
Note: apt-key
is deprecated
You could try updating the repository key. When I try to use the tor repository by adding this line to my sources.lst:
deb http://deb.torproject.org/torproject.org squeeze main
I get the following error:
W: GPG error: http://deb.torproject.org squeeze InRelease: The following
signatures couldn't be verified because the public key is not available:
NO_PUBKEY 74A941BA219EC810
So, the missing key is 74A941BA219EC810. To add (or update in your case) the key run:
sudo apt-key adv --recv-keys --keyserver keys.gnupg.net 74A941BA219EC810
You should now be able to run `apt-get update with no errors.
Note: apt-key
is deprecated
To find any expired repository keys and their IDs, use apt-key
as follows:
apt-key list --keyid-format short | fgrep expired
You will get a result similar to the following:
pub 4096R/BE1DB1F1 2011-03-29 [expired: 2014-03-28]
The key ID is the bit after the /
i.e. BE1DB1F1
in this case.
To update the key, as terdon points out, run
sudo apt-key adv --recv-keys --keyserver keys.gnupg.net BE1DB1F1