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 am using Ubunto 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 172.0.16.200 and port 3128 . while I was back I used No Proxy using Firefox>Preferencs>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:
.................................../01mailrc.txt.gz
HTTP::Tiny failed with an internal error: Could not connect to '172.16.0.200:3128': 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
    .......................................01mailrc.txt.gz
--2012-12-18 01:06:16--  http://cpan.repo.unpas.ac.id/authors/01mailrc.txt.gz
Connecting to 172.16.0.200:3128...  failed: Connection timed out.
Retrying.

--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 I am really in a trouble.

share|improve this question
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

1 Answer 1

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.

CPAN/PEAR/PECL:

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

APT-GET:

echo 'Acquire::http::proxy "http://username:password@your.proxy:8080";' >> /etc/apt/apt.conf
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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