FS#65184 - pacman fails to sync gpg keys under http proxy
Attached to Project:
Arch Linux
Opened by Rodrigo (rodarima) - Friday, 17 January 2020, 13:51 GMT
Last edited by freswa (frederik) - Thursday, 20 February 2020, 21:59 GMT
Opened by Rodrigo (rodarima) - Friday, 17 January 2020, 13:51 GMT
Last edited by freswa (frederik) - Thursday, 20 February 2020, 21:59 GMT
|
Details
Description:
I'm using a proxy with the http_proxy env variable. When upgrading with pacman -Syu, it attempts to update the gpg keys but it fails to connect to the gpg server. I can see with netstat it attempted to contact the server directly rather than using the proxy tcp 0 1 x.x.x.x:52522 192.146.137.99:443 SYN_SENT 88014/dirmngr I found that gpg is not honoring the http_proxy, but it can be fixed by setting the honor-http-proxy option in /etc/pacman.d/gnupg/dirmngr.conf: # echo honor-http-proxy > /etc/pacman.d/gnupg/dirmngr.conf Steps to reproduce: Select a keyserver that uses http or https ports in /etc/pacman.d/gnupg/gpg.conf: keyserver hkps://hkps.pool.sks-keyservers.net:443 Block access to the gpg server port, maybe with iptables. Set up a proxy to tunnel the http and https traffic to a proxy in another host, thus bypassing the block. Then attempt to receive keys and it will fail: # pacman-key --refresh-keys gpg: refreshing 113 keys from hkps://hkps.pool.sks-keyservers.net:443 # netstat -atpn | grep dirmngr tcp 0 1 x.x.x.x:52522 192.146.137.99:443 SYN_SENT 88014/dirmngr |
This task depends upon
No mention here: https://wiki.archlinux.org/index.php/pacman#Pacman_does_not_honor_proxy_settings
Nor here: https://wiki.archlinux.org/index.php/Proxy_server#Environment_variables
Only in a tip here: https://wiki.archlinux.org/index.php/GnuPG#Use_a_keyserver
But, shouldn't honor http_proxy by default?
Why does GnuPG upstream not honor http_proxy by default? I don't think we should override that decision ourselves.
Added!
> Why does GnuPG upstream not honor http_proxy by default? I don't think we should override that decision ourselves.
Not sure, I couldn't find any explanation.