gpg2 --refresh-keys yields the following:
gpg: keyserver refresh failed: No keyserver available
However, I have everything set up in dirmngr.conf:
keyserver hkp://jirk5u4osbsr34t5.onion
keyserver hkps://hkps.pool.sks-keyservers.net
hkp-cacert /home/colan/.gnupg/sks-keyservers.netCA.pem
...and dirmngr can find it:
colan@snake[Tue 13 14:30]% dirmngr
dirmngr[26401.0]: permanently loaded certificates: 0
dirmngr[26401.0]: runtime cached certificates: 0
- Home: ~/.gnupg
- Config: /home/colan/.gnupg/dirmngr.conf
OK Dirmngr 2.1.11 at your service
keyserver
S KEYSERVER hkps://hkps.pool.sks-keyservers.net
OK
Looks like gpg2 isn't grabbing the correct information from the response as here's
what's happening with debugging turned on:
colan@snake[Tue 13 14:30]% gpg2 --refresh-keys --debug-all
[...]
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_6 -> GETINFO version
gpg: DBG: chan_6 <- D 2.1.11
gpg: DBG: chan_6 <- OK
gpg: DBG: chan_6 -> KEYSERVER
gpg: DBG: chan_6 <- OK
gpg: keyserver refresh failed: No keyserver available
gpg: DBG: chan_6 -> BYE
The downstream Ubuntu bug for this is
https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1623159.