Pages

Friday, 27 September 2013

Unable to add ppa behind proxy

While trying to add softwares from sources other than the central debian repository, we may have to add a PPA (Personal Package Archive), so that the software(apt or aptitude) which installs other softwares fetches packages for us from the new location.

The default or normal method to add a PPA via command line is as follows:

sudo add-apt-repository ppa:something

However, if you are behind a proxy, you may not be able to add this way and when you try to do something like this:

This may happen even if you have added your proxy using System Settings -> Network -> Network proxy or in /etc/apt/apt.conf or even in /home/$USER/.bashrc. This is because the sudo user is not aware of the proxy set in the places above. This tutorial explains how to make this work to add a PPA the terminal way.

So lets get started. Please note that all commands and text hereon are case-senstive, take care not to make any typos hereon, to avoid messing up your system):