Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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… 407 Proxy Authentication Required , W:Failed to fetch… 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:/' it will download correctly the google page using the proxy. – Augusto Dec 7 '11 at 14:32

9 Answers 9

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 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
storing passwords in a text file is an awful suggestion – BЈовић Mar 31 '14 at 12:01

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

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 ? – Raja Oct 14 '12 at 14:55

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
storing passwords in a text file is an awful suggestion – BЈовић Mar 31 '14 at 12:00

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

I have made a python script to set the proxy settings in Ubuntu

Assume the following setting, you need to replace at relevant places

  • proxy_address
  • proxy_port 3128
  • proxy_username king
  • proxy_password queen

I have made a video which takes you through all the steps:
Youtube - Setting Simple and Authenticated Proxy Settings in Ubuntu 12 13 14 and above 100% Working.

Steps are Detailed here:

  • First click on Dash
  • In Search Box Enter "Proxy" (Without Quotes)
  • Click on "Network" under Applications
  • Select "Network Proxy"
  • Select Manual
  • Enter the proxy address and proxy port
  • Apply. Enter your system password to confirm

Download the script


Let’s say you have saved the in the Downloads folder

  • Open terminal Type
  • cd ~/Downloads

General Command:
sudo python proxy_address proxy_port proxy_username proxy_password
For our example

  • sudo python 3128 king queen

In case of simple proxy Without authentication the command is:

  • sudo python 3128

In case you have python 3 and above run using python2.7 so the commands will look like

  • sudo python2.7 3128
  • sudo python2.7 3128 king queen
share|improve this answer

Here is a link to a python program named UBPROXY . Given below are the steps to set proxy Authentication.

command to use-> this program. your terminal

3."cd ~/Downloads" (Presuming that your download exist in this directory)

4."chmod +x ubproxy"

5."sudo ./ubproxy"

share|improve this answer

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.