gpg4win --gen-key fails to connect to IPC when using --homedir

Matthew Orlando maorlando at gmail.com
Sun Oct 2 01:30:33 CEST 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
I had to do two things to solve this:

1: use absolute paths for the homedir. E.g.:
    gpg --homedir "C:\users\me\test\gpg" --gen-key

2: kill any existing GnuPG agents with task manager, and then start one
manually using the same homedir:
    gpg-agent --homedir="C:\users\me\test\gpg" --daemon

After you're done, kill the agent you started.

Cheers,

Cogwheel


Tim Chase gnupg at tim.thechases.com
Tue Apr 2 17:00:08 CEST 2013

> I found a similar thread here:
>
> http://lists.gnupg.org/pipermail/gnupg-users/2012-April/044164.html
>
> but it doesn't seem to have been resolved.  gpg4win was installed
> using the default location, and with none of the add-ons (no
> Outlook, shell, extensions, just gpg).  The same operation without
> --homedir works as expected.
>
> Any way to get this to work?
>
> Thanks,
>
> -tkc
>
>
> C:\work\tempgpg> gpg --homedir . --gen-key
> gpg (GnuPG) 2.0.17; Copyright (C) 2011 Free Software Foundation, Inc.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> gpg: keyring `./secring.gpg' created
> gpg: keyring `./pubring.gpg' created
> Please select what kind of key you want:
>    (1) RSA and RSA (default)
>    (2) DSA and Elgamal
>    (3) DSA (sign only)
>    (4) RSA (sign only)
> Your selection? 1
> RSA keys may be between 1024 and 4096 bits long.
> What keysize do you want? (2048) 2048
> Requested keysize is 2048 bits
> Please specify how long the key should be valid.
>          0 = key does not expire
>       <n>  = key expires in n days
>       <n>w = key expires in n weeks
>       <n>m = key expires in n months
>       <n>y = key expires in n years
> Key is valid for? (0) 0
> Key does not expire at all
> Is this correct? (y/N) y
>
> GnuPG needs to construct a user ID to identify your key.
>
> Real name: Joe User
> Email address: joe at example.com
> Comment: Test
> You selected this USER-ID:
>     "Joe User (Test) <joe at example.com>"
>
> Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
> You need a Passphrase to protect your secret key.
>
> gpg: can't connect to the agent: Invalid value passed to IPC
> gpg: problem with the agent: No agent running
> gpg: can't connect to the agent: Invalid value passed to IPC
> gpg: problem with the agent: No agent running
> gpg: Key generation canceled.
>
> C:\work\tempgpg>gpg --version
> gpg (GnuPG) 2.0.17 (Gpg4win 2.1.0)
> libgcrypt 1.4.6
> Copyright (C) 2011 Free Software Foundation, Inc.
> [snip]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
 
iQEcBAEBCAAGBQJX8EcYAAoJEPro35Ne53Y9oHQIAKBKx+//QPuRMQXMVyb1bouk
nH5gNynV6n7K60a+w8N6Liky7a3FKTBpMi3wEkZo5Rw5wMtspuT0pqqT2E13Ml+L
Jw5/habejgQ84QMZB6FFbzM/tQBqnHUFn7EkOutq6ULqYMV7rt2MPba3c16tt/O6
9OoDj9phoXC0AABTDSBDS7AFyCvYJ61DJW6gTtAm8A7PCo39hjLQS5HiMviBWwLt
qqCogHQLuES7+4znA/kip3kuaPHcEiZ6BeG8dlxCkUc7flHlF3XsHg4TWmLwW118
Bv2VTNHMqSU9Mgyl+2qk/bJkSoUFcmxAjb3aVSNgRHoFBjCT89KzmZcikVmU4dE=
=eXvP
-----END PGP SIGNATURE-----




More information about the Gnupg-users mailing list