apt-add-repository, gpg, wget does not honour proxy inside sudo
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On precise wget honours the proxy inside sudo:
0 jan@tunis:
Description: Ubuntu 12.04.4 LTS
0 jan@tunis:/tmp$sudo echo $http_proxy
http://
0 jan@tunis:/tmp$sudo wget www.ubuntu.com
--2014-04-24 18:01:02-- http://
Resolving proxy.aims.ac.za (proxy.
Connecting to proxy.aims.ac.za (proxy.
Proxy request sent, awaiting response... 200 OK
Length: 17268 (17K) [text/html]
Saving to: `index.html.1'
100%[==
2014-04-24 18:01:02 (12,9 MB/s) - `index.html.1' saved [17268/17268]
0 jan@tunis:/tmp$
On trusty, it does not:
ift@gift-laptop:~$ lsb_release -d
Description: Ubuntu 14.04 LTS
gift@gift-laptop:~$ sudo echo $http_proxy
[sudo] password for gift:
http://
gift@gift-laptop:~$ sudo wget www.ubuntu.com
--2014-04-24 19:04:22-- http://
Resolving www.ubuntu.com (www.ubuntu.com)... 91.189.89.103
Connecting to www.ubuntu.com (www.ubuntu.
gift@gift-laptop:~$
This is going to break most of the advice on the internet to e.g. sudo wget somesite/
Related branches
- Ubuntu Core Development Team: Pending requested
-
Diff: 595 lines (+181/-170)10 files modifiedadd-apt-repository (+4/-4)
debian/changelog (+24/-0)
debian/control (+2/-2)
debian/tests/add-apt-repository (+11/-7)
debian/tests/control (+3/-3)
debian/tests/run-tests (+0/-9)
software-properties-gtk (+2/-3)
software-properties-kde (+1/-5)
softwareproperties/ppa.py (+71/-103)
tests/test_lp.py (+63/-34)
affects: | wget (Ubuntu) → software-properties (Ubuntu) |
summary: |
- wget does not honour proxy inside sudo + apt-add-repository, gpg, wget does not honour proxy inside sudo |
Also apt-add-repository is not honouring proxy inside sudo (but both wget and apt-add-repository honours the proxy in su, when a root password is set)
gift@gift-laptop:~$ cat /etc/apt/apt.conf /etc/environment :http:: proxy "http:// proxy.aims. ac.za:3128/"; :https: :proxy "https:/ /proxy. aims.ac. za:3128/"; aims.ac. za:3128/"; usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin:/usr/ games:/ usr/local/ games" proxy.aims. ac.za:3128/" /proxy. aims.ac. za:3128/" aims.ac. za:3128/" aims-desktop 9o/secring. gpg' created 9o/pubring. gpg' created ubuntu. com ubuntu. com: Connection refused aims-desktop nj/secring. gpg' created nj/pubring. gpg' created ubuntu. com ubuntu. com: Connection refused laptop: /home/gift# apt-add-repository -y ppa:aims/ aims-desktop aypocgl/ secring. gpg' created aypocgl/ pubring. gpg' created ubuntu. com aypocgl/ trustdb. gpg: trustdb created laptop: /home/gift#
Acquire:
Acquire:
Acquire::ftp::proxy "ftp://proxy.
PATH="/
http_proxy="http://
https_proxy="https:/
ftp_proxy="ftp://proxy.
gift@gift-laptop:~$ sudo apt-add-repository -y ppa:aims/
gpg: keyring `/tmp/tmphgyjbu
gpg: keyring `/tmp/tmphgyjbu
gpg: requesting key BE796FF2 from hkp server keyserver.
?: keyserver.
gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gift@gift-laptop:~$ sudo -i
root@gift-laptop:~# apt-add-repository -y ppa:aims/
gpg: keyring `/tmp/tmpmeup23
gpg: keyring `/tmp/tmpmeup23
gpg: requesting key BE796FF2 from hkp server keyserver.
?: keyserver.
gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
root@gift-laptop:~# logout
gift@gift-laptop:~$ su
Password:
root@gift-
gpg: keyring `/tmp/tmp_
gpg: keyring `/tmp/tmp_
gpg: requesting key BE796FF2 from hkp server keyserver.
gpg: /tmp/tmp_
gpg: key BE796FF2: public key "Launchpad PPA for AIMS" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
root@gift-
Even sudo inside su does not work!
root@gift- laptop: /home/gift# sudo apt-add-repository -y ppa:aims/ aims-desktop ji/secring. gpg' created ji/pubring. gpg' created ubuntu. com ubuntu. com: Connection refused laptop: /home/gift#
gpg: keyring `/tmp/tmp9kcefx
gpg: keyring `/tmp/tmp9kcefx
gpg: requesting key BE796FF2 from hkp server keyserver.
?: keyserver.
gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
root@gift-
sudo is a very common and recommended way to add a repository.