This pertains to Ubuntu 14.04 behind a proxy server that requires authentication.
I've managed to get apt-get working via proxy. My /etc/apt/apt.conf looks like this:
Acquire::http::proxy "http://my_proxy_server:3128/";
Acquire::https::proxy "https://my_proxy_server:3128/";
Acquire::ftp::proxy "ftp://my_proxy_server:3128/";
Acquire::socks::proxy "socks://my_proxy_server:3128/";
My environment variables look the same - I have http_proxy, https_proxy, ftp_proxy and socks_proxy set.
I've a bunch of questions:
This proxy server needs authentication. I have not specified username and password for apt-get. However, I can still do
apt-get updateand it works just fine. Why?None of the other programs work. For example,
pip installwould fail with the message that it can't fetch https://pypi.python.org/simple
What is the right way to set up proxy?
Update
I installed google-chrome-stable and tried to connect to the internet. It asked me for proxy authentication, which I provided. After this step, wget and pip seem to work fine! This is really strange. I'm guessing there's some configuration that chrome does which allows the other apps to connect as well.
Now, the new question is, how do I configure it as root? for instance, I can do pip install ... and it can download the packages just fine, but if I do sudo pip install ..., it fails to connect to the pypi website.