Possible Duplicate:
How do I add a repository from behind a proxy?

I would like to send an add-apt-repository command via the gnome-terminal on my Ubuntu 11.10 laptop that is connected through a proxy (with username/password). Following this answer, I edited my apt.conf file:
how to install packages with apt-get on a system connected via proxy?


Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/";
Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";

I can now run apt-get install package-name with no problem, but when I try add-apt-repository, it won't work. Any suggestions?

sudo add-apt-repository ppa:bumblebee/stable

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 88, in <module>
    ppa_info = get_ppa_info_from_lp(user, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 65, in get_ppa_info_from_lp
    lp_page = urlopen(req).read()
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 394, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 412, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1209, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1171, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 8] _ssl.c:503: EOF occurred in violation of protocol>

marked as duplicate by Bruno Pereira, Jorge Castro, htorque, Takkat, RolandiXor Jan 4 '12 at 18:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can try as suggested here, as someone has already solved this problem:

How do I add a repository from behind a proxy?


This is a known bug.

According to one of the subscribers you can go around this by using these steps:

sudo visudo

then add the following lines

Defaults env_keep="http_proxy"
Defaults env_keep="https_proxy"


sudo bash
export https_proxy=http://[username:password@]www.proxy.com:8000/
add-apt-repository ppa:<whatever>

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