How to create new keyring from an existing key in an existing keyring?

Henry Hertz Hobbit hhhobbit at securemecca.net
Mon Aug 12 14:04:32 CEST 2013


On 08/12/2013 09:18 AM, Peter Lebbing wrote:
> On 11/08/13 23:11, adrelanos wrote:
>> I could think of a way to export the key, change --homedir, create a new
>> keyring, and import a the key. But is there a more elegant way?
> 
> gpg --export 0xDEADBEEF | gpg --no-default-keyring --keyring \
> /etc/apt/trusted.gpg.d/meat.gpg --import
> 
> (one long command line)

Assumes /etc/apt/trusted.gpg.d exists and is a folder (good
assumption for Debian based, not so good for RPM based) and
that the ordinary user can write a file in the folder (bad
assumption even if your flavor is Debian-esque) with no
changes made.  On Debian-esque you may need to do a:

# chmod 1777 /etc/apt/trusted.gpg.d

then the above command, then:

# chmod 755 /etc/apt/trusted.gpg.d

Does that get you what you want?  Is the "meat" some sort of
comment that adrelanos will be dead meat?  The command is
elegant though.




More information about the Gnupg-users mailing list