Configure Debian apt-get to use a proxy
January 29, 2010 Leave a comment
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:
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:
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.