In Xenial apt-key spawns a process named gpg that honors the env. for http_proxy.
In Bionic the command “apt-key” spawns a process “dirmngr –daemon –homedir /tmp/apt-key-gpghome.[RANDOM STRING]” which do not honor the env. for http_proxy / https_proxy.
Because of the above (homedir set to /tmp/….) the configuration that could be added to the ~/.gnupg/dirmngr.conf is not read by dirmngr. When running just dirmngr in the terminal the config from ~/.gnupg/dirmngr.conf is read. We’ve also tried setting “GNUPGHOME=/home/ubuntu/.gnupg” in /etc/environment.
The difference for Xenial / Bionic
In Xenial apt-key spawns a process named gpg that honors the env. for http_proxy.
In Bionic the command “apt-key” spawns a process “dirmngr –daemon –homedir /tmp/apt- key-gpghome. [RANDOM STRING]” which do not honor the env. for http_proxy / https_proxy.
Because of the above (homedir set to /tmp/….) the configuration that could be added to the ~/.gnupg/ dirmngr. conf is not read by dirmngr. When running just dirmngr in the terminal the config from ~/.gnupg/ dirmngr. conf is read. We’ve also tried setting “GNUPGHOME= /home/ubuntu/ .gnupg” in /etc/environment.