[Bug 1537056] Re: apt-add-repository always returns "user or team does not exist." for ppa repos

James Lewis 1537056 at bugs.launchpad.net
Wed Oct 19 11:48:00 UTC 2016


Just encountered this bug in 16.10, it reported the exact "user or team
does not exist." error, until I added a system wide proxy.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1537056

Title:
  apt-add-repository always returns "user or team does not exist." for
  ppa repos

Status in software-properties package in Ubuntu:
  Confirmed

Bug description:
  I have just installed a fresh Ubuntu 15.10 to my machine and run into
  trouble with adding ppa repositories using apt-add-repository:

  for e.g. running 
  apt-add-repository ppa:git-core/ppa
  Cannot add PPA: 'ppa:~git-core/ubuntu/ppa'.
  ERROR: '~git-core' user or team does not exist.

  After debugging a lot of code, I found the trouble, the used proxy-
  server needs authentification but the apt-add-repository does not
  throw a correct error message fro this case:

  The PPAException raised here seems to be interpreted as not available,
  which is rather hard to debug.

  def _get_https_content_py3(lp_url):
      print("RETRIEVING URL: %s"%lp_url)
      try:
          request = urllib.request.Request(str(lp_url), headers={"Accept":" application/json"})
          lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
          json_data = lp_page.read().decode("utf-8", "strict")
          print("    RV: %s"%str(json_data))
      except (URLError, HTTPException) as e:
          # HTTPException doesn't have a reason but might have a string
          # representation
          print(e)
          reason = hasattr(e, "reason") and e.reason or e
          raise PPAException("Error reading %s: %s" % (lp_url, reason), e)

  The last print(e) gives me the hint what went wrong:
  <urlopen error Tunnel connection failed: 407 Proxy Authorization Required>

  For the future it would be great to get a correct error message.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1537056/+subscriptions



More information about the foundations-bugs mailing list