I am using Ubuntu 12.10. A few days back I needed to change my proxy for connecting to the internet at my institute. After that I can't access the internet through terminal like can't install CPAN lib for Perl or install using apt-get. I changed my proxy to http host and port 3128. while I was back I used No Proxy using Firefox>Preferences>Advanced>Network>Settings and also from Network>NetworkProxy>None

but while I try to install something I get message to authenticate for proxy server. It asks me for user name and password.

debasish@debasish:~$ sudo cpan App::cpanminus
[sudo] password for debasish: 

Fetching with HTTP::Tiny:
HTTP::Tiny failed with an internal error: Could not connect to '': IO::Socket::INET: connect: timeout at /usr/share/perl/5.14/HTTP/Tiny.pm line 139

Proxy authentication needed!
 (Note: to permanently configure username and password run
   o conf proxy_user your_username
   o conf proxy_pass your_password
Username:  debasish.mukherjee

Trying with
    /usr/bin/wget -O "/home/debasish/.cpan/sources/authors/01mailrc.txt.gz.tmp4734"
to get
--2012-12-18 01:06:16--  http://cpan.repo.unpas.ac.id/authors/01mailrc.txt.gz
Connecting to  failed: Connection timed out.

--2012-12-18 01:07:20--  (try: 2) ......

and it ultimately fails.

I also can't install from "Ubuntu Software Centre" or update my os as it showing "Requires installation of untrusted packages"

Please help.

  • 1
    Try setting proxy to "None" in Network and click "Apply system wide" – Salem Dec 17 '12 at 20:53
  • I have already done that.. it is of no use – Debasish Mukherjee Jan 1 '13 at 12:14
  • 1
    What is the output of echo $http_proxy? – qbi Feb 12 '13 at 12:07

A proxy is set using a global variable, but not all software uses this value. Sometimes this needs to be configured per application. Read up on the most used applications here.


pear config-set http_proxy http://username:password@your.proxy:8080


echo 'Acquire::http::proxy "http://username:password@your.proxy:8080";' >> /etc/apt/apt.conf
  • $ export http_proxy='' can clear up the proxy settings too. you can set the proxy to none using $ unity-control-center network – trve.fa7ad Sep 16 '14 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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