Ubuntu 15.04 : Adding a ppa behind a proxy

To install a new PPA (for example the KDE backports to have the latest stable KDE on Kubuntu 15.04) on a connection using a proxy for http/https access :

export http_proxy=http://myProxy:port
export https_proxy=http://myProxy:port
sudo -E add-apt-repository ppa:kubuntu-ppa/backport

The “-E” allows sudo to keep the environment variables defined for the proxy access.

To get apt to use the proxy, create a file /etc/apt/apt.conf.d/50proxy :
Acquire::http::Proxy "http://myProxy:port";
Acquire::https::Proxy "https://myProxy:port";

This entry was posted in TechTips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *