Adding key to the apt keyrings (was: Installing Ubuntu on numeorus machines simultanrously)

Tim Frost timfrost at
Sat Jan 16 01:18:30 UTC 2010

On Sat, 2010-01-16 at 00:43 +0200, Rafiq Hajat wrote:
> Hi all,
> Im trying to set up FAI as per the recommendation from the list, but
> I've run into a brick wall in trying to get the gpg evinced by
> the following transcript. Help...please???
> rafiq at rafiq-laptop:~$ sudo gpg -a --recv-keys AB9B66FD; gpg -a --export
> AB9B66FD | apt-key add -

The preferred way to get a new key into the apt keyring is to tell
apt-key to fetch the key directly.  You must specify the key server to
use - this example uses the ubuntu keyserver):
  sudo apt-key adv --keyserver --recv-keys AB9B66FD

This avoids the need to import the key into your own keyring (unless you
want a copy of that key in your personal keyring).  If you want a
reference copy of the key, then try
 gpg ---recv-keys AB9B66FD; gpg -a --export AB9B66FD | apt-key add -

If ~/.gnupg/gpg.conf doesn't list a keyserver, you will need to specify
the keyserver to the first gpg command, exactly as it is specified for
the apt-key adv operation.

> [sudo] password for rafiq: 
> gpg: WARNING: unsafe ownership on configuration file
> `/home/rafiq/.gnupg/gpg.conf'
> gpg: no keyserver known (use option --keyserver)
> gpg: keyserver receive failed: bad URI
> gpg: WARNING: nothing exported
> gpg: no valid OpenPGP data found.

The following commands fail because apt-key expects a file name for the
add operation to process (the '-' in the above sequence causes it to
read from the pipeline).

> rafiq at rafiq-laptop:~$ sudo apt-key add all
> gpg: can't open `all': No such file or directory
> rafiq at rafiq-laptop:~$ sudo apt-key add
> gpg: can't open `': No such file or directory

> Rafiq Hajat

Hope this helps


Tim Frost <timfrost at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ubuntu-users mailing list