Can't clone private repo hosted on Launchpad
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Breezy |
New
|
Undecided
|
Unassigned | ||
breezy (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
Just upgraded to `mantic`, which ships with `brz 3.3.4`. Unfortunately, I can't clone private repositories:
| $ bzr branch lp:~hloeung/my-private-repo
| brz: ERROR: lazr.restfulcli
| Response headers:
| ---
| connection: close
| content-length: 14
| content-type: text/plain;
| date: Sun, 15 Oct 2023 22:22:50 GMT
| server: gunicorn
| status: 500
| x-lazr-oopsid: OOPS-ddcf9d2b6990edac4388b89b5ba70d6a
| x-powered-by: Zope (www.zope.org), Python (www.python.org)
| x-request-id: 7d2be1eb-
| x-vcs-revision: bd6cfd0cfc024db
| ---
| Response body:
| ---
| b'AssertionError'
| ---
|
|
| Traceback (most recent call last):
| File "/usr/lib/
| return the_callable(*args, **kwargs)
| ^^^^^^^
| File "/usr/lib/
| ret = run(*run_argv)
| ^^^^^^^^^^^^^^
| File "/usr/lib/
| return self.run(
| ^^^^^^^
| File "/usr/lib/
| return class_run(*args, **kwargs)
| ^^^^^^^
| File "/usr/lib/
| accelerator_tree, br_from = controldir.
| ^^^^^^^
| File "/usr/lib/
| controldir = klass.open(
| ^^^^^^^
| File "/usr/lib/
| t = _mod_transport.
| ^^^^^^^
| File "/usr/lib/
| location_
| ^^^^^^^
| File "/usr/lib/
| location = directories.
| ^^^^^^^
| File "/usr/lib/
| return directory.
| ^^^^^^^
| File "/usr/lib/
| return _resolve(url)
| ^^^^^^^^^^^^^
| File "/usr/lib/
| result = _resolve_
| ^^^^^^^
| File "/usr/lib/
| join(lp_
| ^^^^^^^
| File "/usr/lib/
| response, content = self.root.
| ^^^^^^^
| File "/usr/lib/
| raise error
| lazr.restfulcli
| Response headers:
| ---
| connection: close
| content-length: 14
| content-type: text/plain;
| date: Sun, 15 Oct 2023 22:22:50 GMT
| server: gunicorn
| status: 500
| x-lazr-oopsid: OOPS-ddcf9d2b6990edac4388b89b5ba70d6a
| x-powered-by: Zope (www.zope.org), Python (www.python.org)
| x-request-id: 7d2be1eb-
| x-vcs-revision: bd6cfd0cfc024db
| ---
| Response body:
| ---
| b'AssertionError'
| ---
|
|
| brz 3.3.4 on python 3.11.6 (Linux-
| arguments: ['bzr', 'branch', 'lp:~hloeung/my-private-repo']
| plugins: bash_completion
| commitfromnews[
| etckeeper[unknown], fastimport[3.3.4], flake8[unknown], fossil[3.3.4],
| github[3.3.4], gitlab[3.3.4], hg[3.3.4], launchpad[3.3.4], mtn[3.3.4],
| netrc_credentia
| propose[3.3.4], pypi[3.3.4], quilt[unknown], repodebug[3.3.4],
| rewrite[unknown], stats[3.3.4], svn[3.3.4], upload[3.3.4],
| weave_fmt[3.3.4], webdav[3.3.4], zsh_completion[
| encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_US.utf8'
|
| *** Breezy has encountered an internal error. This probably indicates a
| bug in Breezy. You can help us fix it by filing a bug report at
| https:/
| including this traceback and a description of the problem.
The OOPS showing:
| result = self._getMethod
| Module lp.code.
| assert not (self.private and scheme in public_schemes), (
| AssertionError: Private branch ~hloeung/
Any ideas what's wrong here?
I've tried `bzr lp-logout` and `bzr lp-login` without any success.
summary: |
- Can't clone private repo + Can't clone private repo hosted on Launchpad |
I think the correct fix here would be for `breezy. plugins. launchpad. lp_directory. _resolve_ via_api` to handle the case where the `scheme='http'` call returns an error, and omit the http:// URL from the list of URLs that it returns in that case. `scheme='http'` will always fail for private branches. Jelmer?