Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have tried put in apt config Acquire::http::proxy, and in Network>Network proxy with and without user:password@server:port and using environment variables http_proxy and https_proxy. Nothing seems to work, not even a single proxy authentication popup window.

The only proxy configuration working is within Firefox Edit> Preferences> Advanced> Network> Connection> Settings> Manual Proxy Configuration.

  • Using gconf to manually set the proxy doesn't work

Using Synaptic in previous Ubuntu versions was too simple.

share|improve this question
    
Trying install IcedTea: Failed to download repository information. Check your Internet connection. Details: W:Failed to fetch archive.canonical.com/ubuntu/dists/oneiric/partner/binary-amd64/… 407 Proxy Authentication Required , W:Failed to fetch archive.canonical.com/ubuntu/dists/oneiric/partner/binary-i386/… 407 Proxy Authentication Required –  Augusto Nov 10 '11 at 13:02
    
I have made a simple test to demonstrate the problem: 1) open a shell; 2) change user to root using 'sudo su'; 3) declare the proxy variable (# export http_proxy) in the shell environment; 4) open the software-center using the same shell; 5) try to install some package, it will fail; 6) using the same shell type 'wget http:/www.google.com' it will download correctly the google page using the proxy. –  Augusto Dec 7 '11 at 14:32

7 Answers 7

Go to /etc/apt. Create the file apt.conf if you don't have it there. Write the following lines there.

Acquire::http::proxy "http://username:password@proxyserver:port/";
Acquire::https::proxy "https://username:password@proxyserver:port/";
Acquire::socks::proxy "socks://username:password@proxyserver:port/";

Save it. You are done.

share|improve this answer
2  
storing passwords in a text file is an awful suggestion –  BЈовић Mar 31 at 12:00

I had the same problem. However I did have success by setting Acquire::http::proxy in /etc/apt/apt.conf in the format

Acquire::http::proxy "http://user:pass@host:port/";

Note, I initially followed a recommendation somewhere on the web to put this in /etc/apt.conf. The correct path is /etc/apt/apt.conf

share|improve this answer
2  
storing passwords in a text file is an awful suggestion –  BЈовић Mar 31 at 12:01

In the dash button, select the "Network" option. In the network configuration screen you should select "network proxy" > "manual", type your proxy data and finally "Apply to all system". If authentication is required, the login screen will appear.

Another option is to configure directly using the gconftool:

gconftool-2 -t string -s /system/http_proxy/host "YOUR_PROXY_ADDRESS"
gconftool-2 -t int -s /system/http_proxy/port PROXY_PORT
gconftool-2 -t bool -s /system/http_proxy/use_http_proxy true

I hope this help.

share|improve this answer
    
As I already have stated the configuration in Network>Network proxy>Manual with or without user:password is not working for proxies with authentication, it was my first option. And using gconftool command line, as suggested, haven't worked either. :( –  Augusto Nov 9 '11 at 17:35

I had set proxy details in System → Network and applied system wide but was unable to use the Software Center (Firefox was fine).

I do need to enter a username and password but my actual username and password entered in that string wouldn't work, but when I just put in the actual words "user:pass" the Software Center started working!

share|improve this answer

You need to confirm that your username or password must not contain : or @ in it. I had a similar problem and it was solved when I changed my password.

share|improve this answer
    
with a curiosity i want to know why its giving back a problem ? –  AgentCool Oct 14 '12 at 14:55

I've applied all of the above and none of it works for me AT FIRST, even though wget, apt-get, curl, web browsing, thunderbird and suchlike have all worked perfectly for years. Only software centre didn't work.

However, I left it with a grey screen for 2-4 minutes after applying the fix to /etc/apt/apt.conf:

      Acquire::http::proxy "http://user:pass@host:port/"

and then magically it began to work.

share|improve this answer

Well this worked - however it didn't work to just use Acquire::http::proxy "http://host:port/" - I had to use Acquire::http::proxy "http://user:pass@host:port/" even though I haven't a password on the proxy (I just did use "user and pass" to keep the syntax).

share|improve this answer
    
The question was about using auth (i.e. having a password) –  tumbleweed Nov 7 '12 at 8:03

protected by Community Dec 25 '13 at 10:32

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.