bzr_ssh_path_limiter error

Bug #510545 reported by Garth Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

I've tried using 'bzr_ssh_path_limiter' in an ssh authorized keys file to control access, but without luck. I've been using hg-ssh, on which bzr_ssh_path_limiter is based, for several years without problems.

I have

  command="/home/bzr/bin/bzr_ssh_path_limiter /home/bzr/my_code" ssh-rsa . . . ..

in ~/.ssh/authorized_keys2, and I know that the script is being called because I can print from it to std output. When I try to branch over ssh, I get

  bzr: ERROR: Not a branch: "bzr+ssh://<email address hidden>/home/bzr/my_code/".

The problem seems to be with the line

  os.execlp('bzr', 'bzr', '--no-plugins', 'serve', '--inet', '--directory=' + sys.argv[1], '--allow-writes')

I'm using bzr version 2.0.0.

Revision history for this message
Garth Wells (garth-wells) wrote :

I can add to this that on the server size I see in /home/bzr/.bzr.log

0.029 bzr arguments: [u'--no-plugins', u'serve', u'--inet', u'--directory=/home/bzr/code/foo', u'--allow-writes']
0.070 encoding stdout as osutils.get_user_encoding() 'UTF-8'
0.095 return code 0

and on the machine on which I'm running 'bzr branch bzr+ssh:// . .. . .' I see in ~/.bzr.log

0.080 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.125 encoding stdout as sys.stdout encoding 'UTF-8'
0.176 ssh implementation is OpenSSH
0.494 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1202, in run
    from_location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 959, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 844, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 879, in open_from_transport
    return format.open(transport, _found=True)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 2065, in open
    return self._open(transport)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 3294, in _open
    return remote.RemoteBzrDir(transport, self)
  File "/usr/lib/python2.6/dist-packages/bzrlib/remote.py", line 118, in __init__
    raise errors.NotBranchError(path=transport.base)
NotBranchError: Not a branch: "bzr+ssh://<email address hidden>//home/bzr/code/foo/".

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 510545] Re: bzr_ssh_path_limiter error

Could it be that the path limiter means you must urls relative to that
directory?

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Garth Wells (garth-wells) wrote :

I tried all sorts of paths.

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Medium
status: New → In Progress
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Confirmed
tags: added: bzr-ssh-path-limiter
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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