add-apt-repository does not work with proxy auth if an '@' is in the username

Bug #1075180 reported by kenorb
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm trying to add the ppa repository (as a root) with the following command:

export HTTP_PROXY="http://<email address hidden>:my_pass@165.x.x.232:8080"
add-apt-repository ppa:nilarimogard/webupd8

But there is an error:
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 125, in <module>
    ppa_info = get_ppa_info_from_lp(user, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 84, in get_ppa_info_from_lp
    curl.perform()
pycurl.error: (56, 'Received HTTP code 407 from proxy after CONNECT')

Doesn't matter if @ is escaped or not.

When added credentials into .curlrc
cat ~/.curlrc
proxy = 165.x.x.232:8080
proxy-user = <email address hidden>:mypass0

It seems to work for plain curl command, but not for add-apt-repository (pycurl).

CURL HEADERS

Headers sent:
CONNECT launchpad.net:443 HTTP/1.1
Host: launchpad.net:443
Proxy-Authorization: Basic cmFmYWwud2llY3pvcmVrQHVi...3R0RDA=
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Proxy-Connection: Keep-Alive

Reply:
HTTP/1.1 200 Connection established

PyCURL HEADERS

Headers sent:
CONNECT launchpad.net:443 HTTP/1.1
Host: launchpad.net:443
User-Agent: PycURL/7.22.0
Proxy-Connection: Keep-Alive
Accept: application/json

Reply:
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: BASIC realm="proxy"
It seems that PyCURL doesn't re-send any Authorization when requested.

See more explanation here:
http://askubuntu.com/questions/212132/i-cant-add-ppa-repository-behind-the-proxy-with-in-the-username

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

I don't think this is a duplicate, so unmarking it. This problem is that an '@' is in the username. The claimed duplicate of bug 516032 is about proxies in general, which is already fixed.

Also, reassigning to software-properties, since that supplies add-apt-repository and not the apt package.

summary: - I can't add PPA repository behind the proxy
+ add-apt-repository does not work with proxy auth if an '@' is in the
+ username
affects: apt (Ubuntu) → software-properties (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.