Discards credentials specified in URL

Bug #181534 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

Hi Brian,

Am Dienstag, den 08.01.2008, 16:43 -0600 schrieb Brian de Alwis:
> Hi everybody. I'm a new bzr user trying to use bzr-svn to interact
> with a project maintained on a Subversion repository. I'm
> encountering a problem where bzr-svn is trying to access the
> repository using a different URL than that used by Subversion, and
> failing. The project is hosted at https://papyrus.usask.ca/svn/dept/
> gt/ (user: anonymous, no password). I'm using bzr-svn 0.4.5 using
> bzr 1.0 on MacOSX 10.5.1 (installed from pkgsrc, and using Python 2.4).
>
> Trying to do a branch of the project using bzr-svn fails:
>
> > $ bzr branch svn+https://<email address hidden>/svn/dept/gt/trunk
> > bzr: ERROR: Permission denied: ".": PROPFIND request failed on '/svn/
> > dept/gt/trunk'
>
> But I *have* been able to branch from other Subversion-based
> projects. So there's something peculiar about this setup, but I
> haven't been able to figure out (i) what the problem is, and (ii) how
> to fix or work around it. (And I have tried the development branch of
> bzr-svn to no avail.)
>
> The ~/.bzr.log, with -Dtransport, shows:
>
> >
> > bzr arguments: [u'-Dtransport', u'branch', u'svn+https://<email address hidden>
> > /svn/dept/gt/trunk/']
> > looking for plugins in /Users/bsd/.bazaar/plugins
> > looking for plugins in /usr/pkg/lib/python2.4/site-packages/bzrlib/
> > plugins
> > Plugin name __init__ already loaded
> > Plugin name __init__ already loaded
> > encoding stdout as sys.stdout encoding 'UTF-8'
> > opening SVN RA connection to 'https://<email address hidden>/svn/dept/gt/trunk'
> > svn get-repos-root
> > Traceback (most recent call last):
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/commands.py",
> > line 802, in run_bzr_catch_errors
> > return run_bzr(argv)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/commands.py",
> > line 758, in run_bzr
> > ret = run(*run_argv)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/commands.py",
> > line 492, in run_argv_aliases
> > return self.run(**all_cmd_args)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/builtins.py",
> > line 877, in run
> > br_from = Branch.open(from_location)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/branch.py", line
> > 128, in open
> > possible_transports=possible_transports)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/bzrdir.py", line
> > 572, in open
> > return BzrDir.open_from_transport(t, _unsupported=_unsupported)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/bzrdir.py", line
> > 614, in open_from_transport
> > return format.open(transport, _found=True)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/bzrdir.py", line
> > 1438, in open
> > return self._open(transport)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/plugins/svn/
> > format.py", line 71, in _open
> > return remote.SvnRemoteAccess(transport, self)
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/plugins/svn/
> > remote.py", line 49, in __init__
> > self.svn_root_url = _transport.get_svn_repos_root()
> > File "/usr/pkg/lib/python2.4/site-packages/bzrlib/plugins/svn/
> > errors.py", line 99, in convert
> > raise convert_error(e)
> > PermissionDenied: Permission denied: ".": PROPFIND request failed on
> > '/svn/dept/gt/trunk'
> >
> > return code 3
>
> From poking around with pdb in svn.remote.__init__, it looks like the
> right stuff is being resolved:
>
> > (Pdb) p svn_url
> > 'https://<email address hidden>/svn/dept/gt/trunk'
> > (Pdb) p _transport
> > <bzrlib.plugins.svn.transport.SvnRaTransport url=svn+https://<email address hidden>
> > /svn/dept/gt/trunk>
>
> But using SVN to look at the properties works fine:
>
> > $ svn proplist --username anonymous https://papyrus.usask.ca/svn/dept/gt/trunk/
> > Properties on 'https://papyrus.usask.ca/svn/dept/gt/trunk':
> > svn:ignore

> The server logs show a different story, however: bzr-svn and svn are
> using different URLs for the PROPFIND. bzr-svn seems to be
> providing
> the verbatim path (and note the user name isn't appearing either;
> not
> sure if that's actually relevant):
I think the problem is the fact that bzr-svn doesn't pick up the
username. bzr-svn doesn't support usernames in urls at the moment (it
passes the url on verbatim to subversion, which doesn't support it).

You can do two things to fix this:

* Make sure svn caches the username for the repository. This should be a
matter of running "svn proplist
https://papyrus.usask.ca/svn/dept/gt/trunk/" without the --username
argument. Subversion will ask you for the username and should cache it.

* Install a recent Subversion 1.5 snapshot and use bzr-svn 0.4.6. In
this situation, bzr-svn should prompt you for a username/password
combination.

Cheers,

Jelmer

This is a bug in bzr-svn.

  affects bzr-svn
  status triaged
  importance medium
  summary "Discards credentials specified in URL"

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

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Fixed in bzr.

Changed in bzr-svn:
assignee: nobody → jelmer
milestone: none → 0.4.10
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → 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.