1

I'm trying to improve this answer. As you can guess, add-apt-repository doesn't work through proxy, and accepted answer doesn't work for me. I tried:

  • Setting and preserving local variables

    export http_proxy=http://proxy:port
    export https_proxy=$http_proxy
    sudo -E
    

    which just does nothing

  • editing /etc/environment has same effect
  • editing sudoers' file has same effect besides graphical apps cannot access mir

The mentioned answer helps, but doesn't fix the problem, because add-apt-repository cannot be simply modified to use proxy and keyserver port 80 every time. Lurking more I discovered that real problem is gpg configuration, which is badly documented. I just couldn't realize how to set http-proxy option or to honor-system-proxy permanently.

Trying to set option honor-http-proxy I wrote ~/.gnupg/dirmng.conf with such contents, but it didn't help:

honor-http-proxy

Also, I had no such problem before, in Ubuntu 8.04 — 16.04. Yep, the problem may be not in the proxy config, but in the keyserver port. If so, I'd like to set keyserver to use port 80 by default.

Any ideas are welcome.

Danatela
  • 13,243
  • 11
  • 45
  • 72
  • Even if an HTTP proxy is used, the proxy might not like the port the keyserver uses, so I tend to set a keyserver that uses port 80: http://unix.stackexchange.com/q/75892/70524 – muru Jan 12 '17 at 11:45
  • Yep. If so, I'd like to save this config option too. BTW, I had no such problem in 16.04. – Danatela Jan 13 '17 at 03:17

0 Answers0