Creating and installing a local GPG key for testing purposes

Май 22nd, 2013 | Posted by elenst in Pensieve | Testing - (Комментарии отключены)

No fancy GUI is necessary. The base gpg is installed on Ubuntu by default.

gpg --gen-key

Use default type, size and duration.
Enter the name and the email address (I suppose it doesn’t matter which as long as it’s for testing only).
Type O to create the key.
Enter a passphrase twice.
Move your mouse like crazy, but try to spare the effort, it might take long and you’ll get tired. When it’s enough, it will tell you it’s enough. Until it does, keep moving. Don’t stop for long, or you’ll have to repeat the exercise.

The file pubring.gpg will appear in $HOME/.gnupg/

Finally,

sudo apt-key add $HOME/.gnupg/pubring.gpg

Now I can run apt-get update with repos where something is signed with this key.

GPG error: BADSIG .. Ubuntu Archive Automatic Signing Key

Август 21st, 2012 | Posted by elenst in Pensieve - (Комментарии отключены)


GPG error: http://ru.archive.ubuntu.com oneiric Release: The following signatures were invalid:
BADSIG <..> Ubuntu Archive Automatic Signing Key
A error occurred during the signature verification. The repository is not updated and the previous index files will be used.
GPG error: http://extras.ubuntu.com oneiric Release: The following signatures were invalid:
BADSIG <..> Ubuntu Extras Archive Automatic Signing Key
Failed to fetch http://extras.ubuntu.com/ubuntu/dists/oneiric/Release
Some index files failed to download. They have been ignored, or old ones used instead.

Solution (well, workaround):
sudo rm /var/lib/apt/lists/* && sudo rm /var/lib/apt/lists/partial/* && sudo apt-get update

Discussion:
https://bugs.launchpad.net/ubuntu/+source/synaptic/+bug/863306

I took it from here