Add new functionality to easily check lost public key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Tweak |
Confirmed
|
Medium
|
Ding Zhou |
Bug Description
Hi,
I think it will be useful if Ubuntu Tweak could check the source list file and automatically retrieve from the servers any (not just the ones provided by Ubuntu Tweak) missing public key to avoid that error when updating. I think this will be really useful for both new Ubuntu users and more advanced ones.
There is a script that I found on line that is supposed to do this, but I was lucky with just some of the repositories (it didn't work for the virtualbox one), but it might be a good starting point:
#! /bin/sh
# Script created by blackgr [ http://
# originally downloaded from this webpage: [http://
# (in case you care or need someone to complain to) mirrored and distributed here http://
# License: unknown (my educated guess is it's in the Public Domain)
if [ "`whoami`" != "root" ];
then
echo "Please run with SUDO"
exit 1
fi
RELEASE=`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d"=" -f2`
echo Release: $RELEASE
echo Please Wait...
for q in `find /etc/apt/ -name *.list`; do
cat $q >> fullsourceslist
done
for i in `cat fullsourceslist | grep "deb http" | grep ppa.launchpad | grep $RELEASE | cut -d/ -f4`; do
wget -q --no-check-
done
for j in `cat keyss` ; do
wget -q --no-check-
sudo apt-key add keyss2
rm keyss2
done
rm keyss
rm fullsourceslist
Thanks!
Changed in ubuntu-tweak: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → TualatriX (tualatrix) |
milestone: | none → 0.5.5 |
Changed in ubuntu-tweak: | |
milestone: | 0.5.5 → 0.5.6 |
Changed in ubuntu-tweak: | |
milestone: | 0.5.6 → 0.5.7 |
Changed in ubuntu-tweak: | |
milestone: | 0.5.7 → 0.6.0 |
Changed in ubuntu-tweak: | |
milestone: | 0.6.0 → 0.7.0 |
Changed in ubuntu-tweak: | |
milestone: | 0.7.0 → 0.8.0 |
Changed in ubuntu-tweak: | |
milestone: | 0.8.0 → 0.9.0 |
Thanks for your answer. I have no knowledge of how the script works... but I guess it can be improved somehow cause its not 100% effective.
For those keys it can not import, I use the following two commands that work:
gpg --keyserver subkeys.pgp.net --recv {KEY HERE}
gpg --export --armor {KEY HERE} | sudo apt-key add -
I bet you know how to replace the commands in the script to use these commands that proved to work all the time.
Again, thanks for your answer and congratulations for the great job!