4

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?

/etc/apt/apt.conf

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>
719016
  • 6,217

2 Answers2

3

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"

then:

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

Bruno Pereira
  • 73,643
2

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

How do I add a repository from behind a proxy?

heiko81
  • 1,915