How to configure proxy authentication to work with Ubuntu Software Center?

239,904

Solution 1

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.

Solution 2

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

Solution 3

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:
239,904
Augusto
Author by

Augusto

Updated on September 18, 2022

Comments

  • Augusto
    Augusto over 1 year

    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.

  • Augusto
    Augusto over 12 years
    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. :(
  • mx7
    mx7 over 11 years
    with a curiosity i want to know why its giving back a problem ?
  • tumbleweed
    tumbleweed over 11 years
    The question was about using auth (i.e. having a password)
  • BЈовић
    BЈовић about 10 years
    storing passwords in a text file is an awful suggestion
  • FearlessHyena
    FearlessHyena over 8 years
    @BЈовић i agree. what's the alternative?
  • BЈовић
    BЈовић over 8 years
    @SHA1 I would write an answer if I knew :)
  • amolbk
    amolbk over 5 years
    @BЈовић One possible alternative to not storing passwords in apt.conf: First access internet using a web browser. Enter your access credentials if required. Once connected, the proxy probably caches your access for some period. Now apt should be able to access internet, with just the proxy name and port in apt.conf. This is general should work for any other application as well.