Using aptitude/apt-get with Proxy Authentication

Written by - 1 comments

Published on May 4th 2012 - Listed in Linux Network


After making a few tests with openSUSE 12.1 and Ubuntu 12.04 LTS on a workstation, I ran into proxy authentication problems when trying to update the OS.

While on openSUSE zypper simply doesn't support proxy authentication (yet... a bug is still open), at least on Ubuntu there's the possibility to add the proxy settings to the apt configuration.

In your /etc/apt/apt.conf file you need to enter the following lines:

# cat /etc/apt/apt.conf
Acquire::http::proxy "http://proxyuser:password@proxyserver:8080/";
Acquire::https::proxy "http://proxyuser:password@proxyserver:8080/";
Acquire::ftp::proxy "http://proxyuser:password@proxyserver:8080/";

Note that without proxy authentication, it is not necessary to enter the user and password credentials.


Add a comment

Show form to leave a comment

Comments (newest first)

dachrissi from Berlin, Germany wrote on Jun 12th, 2012:

And if you have mixed sources (own mirror server plus official mirrors) your can usw this:

Acquire::http::proxy "http://proxy.domain.tld:8080/";
Acquire::https::proxy "https://proxy.domain.tld:8080/";
Acquire::http::proxy::localmirror.domain.tld "DIRECT";