[Bug 1713962] Re: apt-add-repository times out behind proxy

CB 1713962 at bugs.launchpad.net
Mon Nov 13 16:39:07 UTC 2017


I was able to fix it by using --keyserver-options like in the following
patch:

diff /usr/lib/python3/dist-packages/softwareproperties/ppa.py{.orig,}
189,195c189,207
<         res = subprocess.call(self.GPG_DEFAULT_OPTIONS + [
<             "--homedir", keyring_dir,
<             "--secret-keyring", secret_keyring,
<             "--keyring", keyring,
<             "--keyserver", self.keyserver,
<             "--recv", signing_key_fingerprint,
<             ])
---
>         http_proxy = os.environ.get("http_proxy")
>         if http_proxy != "":
>             res = subprocess.call(self.GPG_DEFAULT_OPTIONS + [
>                 "--homedir", keyring_dir,
>                 "--secret-keyring", secret_keyring,
>                 "--keyring", keyring,
>                 "--keyserver", self.keyserver,
>                 "--keyserver-options", "http-proxy=" + http_proxy,
>                 "--recv", signing_key_fingerprint,
>                 ])
>         else:
>             res = subprocess.call(self.GPG_DEFAULT_OPTIONS + [
>                 "--homedir", keyring_dir,
>                 "--secret-keyring", secret_keyring,
>                 "--keyring", keyring,
>                 "--keyserver", self.keyserver,
>                 "--recv", signing_key_fingerprint,
>                 ])
>

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1713962

Title:
  apt-add-repository times out behind proxy

Status in software-properties package in Ubuntu:
  Confirmed

Bug description:
  1) Release
  Ubuntu 17.04

  2) Package
  software-properties-common: 0.96.24.13

  3) What you expected to happen
  GPG key processed successfully
  e.g.

  $ sudo -E add-apt-repository ppa:whatever

  Press [ENTER] to continue or ctrl-c to cancel adding it

  gpg: keybox '/tmp/tmpby0unfol/pubring.gpg' created
  gpg: /tmp/tmpby0unfol/trustdb.gpg: trustdb created
  gpg: key XXXXXXXXXX: public key "Launchpad VLC" imported
  gpg: no ultimately trusted keys found
  gpg: Total number processed: 1
  gpg:               imported: 1
  OK

  4) What happened instead
  Timeout on gpg command
  e.g.

  $ sudo -E add-apt-repository ppa:whatever

  Press [ENTER] to continue or ctrl-c to cancel adding it

  gpg: keybox '/tmp/xxx/pubring.gpg' created
  Error: retrieving gpg key timed out.

  5) Additional info

  - OK on Ubuntu 16.04.3 LTS, software-properties-common: 0.96.20.7
  - Network Proxy is set via GUI, applied system wide

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1713962/+subscriptions



More information about the foundations-bugs mailing list