proxy settings don't help with update manager

I'm currently behind a proxy at my university. I can access the www on this computer by changing chromium's proxy settings.

I can also use the command line apt-get only by running this function each time:

function uniproxy()
{
  read -s -p ">> " mypassword
  export http_proxy=http://myusername:[email protected]:8000
  export https_proxy=http://myusername:[email protected]:8000
  export ftp_proxy=http://myusername:[email protected]:8000
  echo ""
}

When I change preferences>networks proxy appropriately, it won't let me use command-line apt-get. More importantly though, update manager cannot connect even when I change the aforementioned settings. I also changed the synaptic settings to see if that would help, but alas - update manager won't connect.

How can I resolve this?


Solution 1:

Try creating a file /etc/apt/apt.conf with the following contents:

Acquire::http::Proxy "http://myusername:[email protected]:8000";

That should work for any apt invocation, whether it is through the command line, synaptic or update-manager.

Solution 2:

After editing /etc/apt/apt.conf as per James' suggestion, run sudo apt-get update in a terminal.

This worked for me. Admittedly I have no idea why.

Also, I found apt-config dump to be useful at catching syntax errors in the apt.conf file.

Solution 3:

I had this problem, I resolved it by clicking the "Apply system-wide" button on the proxy settings in System Settings. The apply button isn't that noticeable.