gen-key non-interactively

Peter Pentchev roam at ringlet.net
Thu Feb 8 16:51:03 CET 2007


On Thu, Feb 08, 2007 at 04:59:26AM -0500, Mark Pinto wrote:
> I'm wanting to pass all of the information that gpg needs to create a
> key (key size, type, expiration, userid, etc) initially and not have
> gpg keep pausing to ask the user.  I've read the man page, read gpg
> --help, googled, and I still cant figure out how to pass those things
> to gpg while using --gen-key.  Any help would be *greatly*
> appreciated.

If you are trying to do this as part of a bigger program, you might
want to check out the gpgme and libgcrypt libraries.

Otherwise, the gnupg manual page mentions an experimental method for
using --gen-key non-interactively, which is described in the DETAILS
file in the doc/ subdirectory of the gnupg source archive.  Thus, you
need to download the gnupg source (either 1.4.x or 2.0.x, depending on
which version you're using anyway), read the doc/DETAILS file, and see
if the method described there works for you.  I just tried it with
GnuPG 1.4.6, and it worked just fine here.

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net    roam at cnsys.bg    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : /pipermail/attachments/20070208/0a3372dc/attachment.pgp 


More information about the Gnupg-users mailing list