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 Acquire::http::proxy "http://proxy.aims.ac.za:3128/"; Acquire::https::proxy "https://proxy.aims.ac.za:3128/"; Acquire::ftp::proxy "ftp://proxy.aims.ac.za:3128/"; PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" http_proxy="http://proxy.aims.ac.za:3128/" https_proxy="https://proxy.aims.ac.za:3128/" ftp_proxy="ftp://proxy.aims.ac.za:3128/" gift@gift-laptop:~$ sudo apt-add-repository -y ppa:aims/aims-desktop gpg: keyring `/tmp/tmphgyjbu9o/secring.gpg' created gpg: keyring `/tmp/tmphgyjbu9o/pubring.gpg' created gpg: requesting key BE796FF2 from hkp server keyserver.ubuntu.com ?: keyserver.ubuntu.com: Connection refused 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/aims-desktop gpg: keyring `/tmp/tmpmeup23nj/secring.gpg' created gpg: keyring `/tmp/tmpmeup23nj/pubring.gpg' created gpg: requesting key BE796FF2 from hkp server keyserver.ubuntu.com ?: keyserver.ubuntu.com: Connection refused 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-laptop:/home/gift# apt-add-repository -y ppa:aims/aims-desktop gpg: keyring `/tmp/tmp_aypocgl/secring.gpg' created gpg: keyring `/tmp/tmp_aypocgl/pubring.gpg' created gpg: requesting key BE796FF2 from hkp server keyserver.ubuntu.com gpg: /tmp/tmp_aypocgl/trustdb.gpg: trustdb created gpg: key BE796FF2: public key "Launchpad PPA for AIMS" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK root@gift-laptop:/home/gift#
Even sudo inside su does not work!
root@gift-laptop:/home/gift# sudo apt-add-repository -y ppa:aims/aims-desktop gpg: keyring `/tmp/tmp9kcefxji/secring.gpg' created gpg: keyring `/tmp/tmp9kcefxji/pubring.gpg' created gpg: requesting key BE796FF2 from hkp server keyserver.ubuntu.com ?: keyserver.ubuntu.com: Connection refused gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused gpg: no valid OpenPGP data found. gpg: Total number processed: 0 root@gift-laptop:/home/gift#
sudo is a very common and recommended way to add a repository.
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.