Page MenuHome GnuPG

keyserver command line argument ignored if present in gpg.conf
Closed, ResolvedPublic

Description

As discussed on the gnupg devel mailing list:
https://lists.gnupg.org/pipermail/gnupg-devel/2014-December/029213.html

GnuPG 2.1 ignores the keyserver option from the command line.

With a non existant keyserver hkp://intevation.de in the config:

gpg2 --debug-all --keyserver hkp://keys.gnupg.net --search \

aheinecke@intevation.de

gpg: reading options from '/home/aheinecke/.gnupg/gpg.conf-2'
gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
gpg: enabled debug flags: packet mpi cipher filter iobuf memory cache memstat
trust hashing extprog cardio assuan clock
gpg: DBG: [not enabled in the source] start
gpg: DBG: chan_3 <- # Home: /home/aheinecke/.gnupg
gpg: DBG: chan_3 <- # Config: /home/aheinecke/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.1.3-beta66 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> KEYSERVER --clear hkp://keys.gnupg.net
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER hkp://intevation.de
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_SEARCH -- aheinecke@intevation.de
gpg: DBG: chan_3 <- ERR 167772346 No keyserver available <Dirmngr>
gpg: no keyserver known (use option --keyserver)
gpg: keyserver search failed: No keyserver available
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0

outmix=0 getlvl1=0/0 getlvl2=0/0

gpg: secmem usage: 0/32768 bytes in 0 blocks

Details

Version
master

Event Timeline

neal claimed this task.
neal added a subscriber: neal.

This was a change in behavior in 2.1 (relative to 2.0 / 1.4) in which instead of
taking the last specified key server, all key servers were used. I've now
reverted this in f26ba14028d34845ae10aae552b90681907e377d.