Crash with authenticated https checkout

Bug #141105 reported by Maciej Katafiasz
6
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Vincent Ladeuil

Bug Description

When checking out from an authenticated https repository, I get the following backtrace:

mathrick@hatsumi:/tmp$ bzr get https://beta.aimido.de/svn/src2/trunk
bzr: ERROR: exceptions.KeyError: 77

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 817, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 779, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 477, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 857, in run
    br_from = Branch.open(from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 131, in open
    control = bzrdir.BzrDir.open(base, _unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 531, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 568, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 116, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1505, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 545, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1249, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1259, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 177, in get
    code, response_file = self._get(relpath, None)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 152, in _get
    return self._get_full(relpath)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 187, in _get_full
    self._curl_perform(curl, header)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 277, in _curl_perform
    e[0], _pycurl_errors.errorcode[e[0]], e, url)
KeyError: 77

bzr 0.90.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'get', 'https://beta.aimido.de/svn/src2/trunk']

** please send this report to <email address hidden>

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 141105] Crash with authenticated https checkout

Am Mittwoch, den 19.09.2007, 22:30 +0000 schrieb mathrick:
> Public bug reported:
>
> When checking out from an authenticated https repository, I get the
> following backtrace:
>
> mathrick@hatsumi:/tmp$ bzr get https://beta.aimido.de/svn/src2/trunk
> bzr: ERROR: exceptions.KeyError: 77
>
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 817, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 779, in run_bzr
> ret = run(*run_argv)
> File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 477, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 857, in run
> br_from = Branch.open(from_location)
> File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 131, in open
> control = bzrdir.BzrDir.open(base, _unsupported)
> File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 531, in open
> return BzrDir.open_from_transport(t, _unsupported=_unsupported)
> File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 568, in open_from_transport
> redirected)
> File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 116, in __call__
> return obj(*args, **kwargs)
> File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1505, in do_catching_redirections
> return action(transport)
> File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 545, in find_format
> transport, _server_formats=_server_formats)
> File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1249, in find_format
> return format.probe_transport(transport)
> File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1259, in probe_transport
> format_string = transport.get(".bzr/branch-format").read()
> File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 177, in get
> code, response_file = self._get(relpath, None)
> File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 152, in _get
> return self._get_full(relpath)
> File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 187, in _get_full
> self._curl_perform(curl, header)
> File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 277, in _curl_perform
> e[0], _pycurl_errors.errorcode[e[0]], e, url)
> KeyError: 77
You should be able to work around this by prefixing the URL with svn+,
e.g.:

svn+https://beta.aimido.de/svn/src2/trunk

Cheers,

Jelmer

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Vincent Ladeuil (vila) wrote :

>>>>> "Mathrick" == Launchpad Bug Tracker <email address hidden> writes:

    Mathrick> You have been subscribed to a public bug:
    Mathrick> When checking out from an authenticated https repository, I get the
    Mathrick> following backtrace:

    Mathrick> mathrick@hatsumi:/tmp$ bzr get https://beta.aimido.de/svn/src2/trunk
    Mathrick> bzr: ERROR: exceptions.KeyError: 77

<snip/>

    Mathrick> File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 277, in _curl_perform
    Mathrick> e[0], _pycurl_errors.errorcode[e[0]], e, url)
    Mathrick> KeyError: 77

This error code (77) do not exist in curl-7-15.5, what OS/curl version are you using ?

Revision history for this message
Maciej Katafiasz (mathrick) wrote :

I have python-pycurl 7.16.4-1 and libcurl3-gnutls 7.16.4-2ubuntu1.

When trying svn+https://, I get:

mathrick@hatsumi:/tmp$ bzr get svn+https://beta.aimido.de/svn/src2/trunk
bzr: ERROR: libsvn._core.SubversionException: ("Undefined tunnel scheme 'https'", 125002)

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 817, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 779, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 477, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 857, in run
    br_from = Branch.open(from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 132, in open
    return control.open_branch(_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/format.py", line 177, in open_branch
    repos = self.find_repository()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/format.py", line 107, in find_repository
    transport = transport.clone_root()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/transport.py", line 416, in clone_root
    return SvnRaTransport(self.get_repos_root(), self.base)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/errors.py", line 70, in convert
    raise convert_error(e)
SubversionException: ("Undefined tunnel scheme 'https'", 125002)

bzr 0.90.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'get', 'svn+https://beta.aimido.de/svn/src2/trunk']

** please send this report to <email address hidden>

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 141105] Re: Crash with authenticated https checkout

Am Donnerstag, den 20.09.2007, 15:04 +0000 schrieb mathrick:
> I have python-pycurl 7.16.4-1 and libcurl3-gnutls 7.16.4-2ubuntu1.
>
> When trying svn+https://, I get:
Please try a more recent version of bzr-svn, either 0.4.2 or 0.4.3.
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Maciej Katafiasz (mathrick) wrote :

It seems to be a general https:// failure of bzr as installed from current Gutsy debs:

mathrick@hatsumi:/tmp$ bzr checkout --light https://code.launchpad.net/~garyvdm/bzr-gtk/vizchanges
bzr: ERROR: exceptions.KeyError: 77

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 817, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 779, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 477, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 943, in run
    source = Branch.open(branch_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 131, in open
    control = bzrdir.BzrDir.open(base, _unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 531, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 568, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 116, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1505, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 545, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1249, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1259, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 177, in get
    code, response_file = self._get(relpath, None)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 152, in _get
    return self._get_full(relpath)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 187, in _get_full
    self._curl_perform(curl, header)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 277, in _curl_perform
    e[0], _pycurl_errors.errorcode[e[0]], e, url)
KeyError: 77

bzr 0.90.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'checkout', '--light', 'https://code.launchpad.net/~garyvdm/bzr-gtk/vizchanges']

** please send this report to <email address hidden>

Revision history for this message
SebastienBarthelemy (barthelemy) wrote :

I confirm this problem with both svn+https:// and https:// archive on gutsy with

bzr 0.90.0 on python 2.5.1.final.0 (linux2)
bzr-svn 0.4.1-1

Revision history for this message
Vincent Ladeuil (vila) wrote :

Thie bug is related, while different, to bug #82086

Revision history for this message
SebastienBarthelemy (barthelemy) wrote :

As a workaround one can
 - for https:// : use https+urllib:// instead of https:// (there will be no certificate check)
 - for svn+https:// : use version 0.4.3 of the bzr-svn plugin

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Vincent Ladeuil (vila) wrote :

Now that bug #147530 has been fix released, bzr should now report a better error that should point users to the right solution: using a more recent version of bzr-svn, either 0.4.2 or 0.4.3.
So I close that bug.

Changed in bzr:
assignee: nobody → v-ladeuil
status: Confirmed → Fix Released
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.