Advanced

Basic apt key management

Posted by jhansonxi on · 4 comments
Stubborn Tech Problem Solving; By jhansonxi
Mail this story
Print this story

Ubuntu's keyserver, keyserver.ubuntu.com, has a lot of problems lately. I was trying to add the Pidgin repository to work around bug #389322 but kept getting timeout errors from the server. One of my systems did successfully get the key so all I had to do was transfer it to the others. These are the commands you can use to do the same.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Debian, Ubuntu

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (4)

After I've set up the initial computer with the list (a longish one) of the repositories and associated keys, I simply make a copy of the directory and copy that to each other computer, then I do an update on that machine to sync the software versions. of already installed applications.
@jhansonxi You could use any of the PGP/GnuPG public keyservers instead (e.g. pgp.mit.edu, wwwkeys.pgp.net, wwwkeys.uk.pgp.net) if there is a problem with ubuntu's keyserver. All the keys are synced with other keyservers around the world.
@tracyanne: Not all of the systems I care for have the same repos as they weren't part of a mass deployment. Some have a lot of third-party repos for experimental stuff that I don't necessarily want all of my users to rely on. I have set up a full debmirror in the past but found it was using more bandwidth than it saved (I have the usual ISP GB/month limits to worry about.) I could put all the keys I have on one ring and copy that easily enough.

@krisum: Thanks for the tip.
TA, if my experience in 14 years of Debian is any guide, I'd just sure you don't copy the directory _tree_, just the files in the directory:

$ ls -l /etc/apt total 48 drwxr-xr-x 2 root root 4096 2009-09-12 14:36 apt.conf.d -rw------- 1 root root 0 2009-08-11 08:08 secring.gpg -rw-r--r-- 1 root root 1279 2009-08-11 10:28 sources.list drwxr-xr-x 2 root root 4096 2009-04-20 15:54 sources.list.d -rw------- 1 root root 1200 2009-08-11 14:49 trustdb.gpg -rw------- 1 root root 22547 2009-08-13 08:19 trusted.gpg

The apt.conf.d directory has machine specific information, such as the hardware architecture, which can be different even if you use the same repositories.

I've "copied" the .gpg files and sources.list from machine to machine, as well as using them from backups when system rebuilding, with no problems at all.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post