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.

Hi
I've a problem at the office. We're behind a proxy (which is set and applied at ubuntu proxy settings) and when I try to add a repository from terminal, I get:

Error reading --some url here--: urlopen error [Errno 113] No route to host

I've tried with

  • Launchpad-getkeys script. I get this (image)

enter image description here

  • I've tried with another "hack", without luck

    1. Press Alt-F2 and type gksu gedit /usr/lib/python2.6/dist-packages/softwareproperties/ppa.py
    2. Find line 88, change keyserver.ubuntu.com to hkp://keyserver.ubuntu.com:80
    3. Save, close and reboot.

Does anyone know if I could solve this problem in any way? Thanks

share|improve this question
add comment

3 Answers 3

up vote 11 down vote accepted

Your issue is described on this following bug report, It seems that the proper fix is described at commment #11:

  1. Set the variable https_proxy to your proxy
  2. Edit /etc/sudoers or the correct file in /etc/sudoers.d/ so it contains:

    Defaults env_keep = https_proxy

share|improve this answer
    
Joao, I've added variables to /home/myuser/.bashrc, then added the env_keep stuff to /etc/sudoers, and now when I execute this command "sudo env | grep proxy" I get the variables showing. When I add a repository or execute the launchpad-getkeys script, I don't get errors anymore. THANKS!! –  Enrique Jan 26 '11 at 11:56
add comment

The script you've mentioned - launchpad-getkeys now has proxy support.

share|improve this answer
    
Although I solved the question with the /etc/sudoers, I also read the launchpad-getkeys news in the rss feed, and now with -p ip:port this is an awesome feature! thanks Alin !! –  Enrique Feb 22 '11 at 17:00
add comment

You have to enter the root account and add the repository from there:

sudo su
add-apt-repository ppa:xxxyyy/ppa
share|improve this answer
add comment

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.