Configure Debian apt-get to use a proxy

So it seems configuring apt-get to use a proxy would be a pretty simple thing. The syntax for the entries in ” /etc/apt/apt.conf” are real simple; the HTTP entry, for example, is just:

Acquire::http::Proxy “http://user:password@proxy.example.com:0000″;

However, other forces, on your machine behind the firewall, are at work against you, and you probably put them them there.

If you have set up for using the proxy elsewhere, like setting environment variables:

http_proxy=”http://proxy.example.com:0000″

or

ftp_proxy=”http://proxy.example.com:0000”

in .bashrc or the like

or used Gnome’s  System -> Preferences -> Network Proxy tool to set a proxy server, which do not include the user name and password (or cannot) in the entries, then you are probably feeling the pain I had this morning. It seems that having the environment variables http_proxy and ftp_proxy set, trumps the entry “apt.conf” that can take the user name and password.

So to get it going, add the entries in “apt.conf” with the user name and password (and probably want to remember to take em out after getting updated or whatever) and temporarily remove other proxy server entries from the other places you may stuck them, then get a new shell and you should be happily apt-getting away though the proxy.

Advertisements

About Jayson
Father, mountain biker, Software development manager at a wire service, and also work with the IPTC (iptc.org)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: