bzr_access causes error not a branch

Asked by Cam Nguyen

When accessing the server repository through bzr_access I got the "Not a branch" error.

I have my repository set up on a server at /bazaar/myproject. ls /bazaar/myproject shows:
.bzr branch1 branch2 bzr_access.conf

Following the security documentation, on each user authorized_keys I add the line
command="/urs/local/sbin/bzr_access /urs/bin/bzr /bazaar/myproject username", no-port-forwarding etc...

bzr_access.conf is of the form documented in bazaar security documentation.

when I try "bzr branch bzr+ssh://ip-address/bazaar/myproject/branch1" I got the error
bzr: ERROR: Not a branch: "bzr branch bzr+ssh://ip-address/bazaar/myproject/branch1/"

Without the adding the command= line, there is no problem branching or checking out.

What did I do wrong? Is my bzr_access.config file in the wrong place?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Bennetts
Solved:
Last query:
Last reply:
Revision history for this message
Best Andrew Bennetts (spiv) said :
#1

> I have my repository set up on a server at /bazaar/myproject. ls /bazaar/myproject shows:
> .bzr branch1 branch2 bzr_access.conf
>
> Following the security documentation, on each user authorized_keys I add the line
> command="/urs/local/sbin/bzr_access /urs/bin/bzr /bazaar/myproject username", no-port-forwarding etc...

Does your authorized_keys really say “/urs/…”? It should be “/usr/…”.

> bzr_access.conf is of the form documented in bazaar security documentation.
>
> when I try "bzr branch bzr+ssh://ip-address/bazaar/myproject/branch1" I got the error
> bzr: ERROR: Not a branch: "bzr branch bzr+ssh://ip-address/bazaar/myproject/branch1/"

I think with the bzr_access command you gave your branch would be at:

    bzr+ssh://ip-address/branch1

See also
<http://doc.bazaar.canonical.com/bzr.dev/en/admin-guide/simple-setups.html#using-a-restricted-ssh-account-to-host-multiple-users-and-repositories>

-Andrew.

Revision history for this message
Cam Nguyen (ctnguyen1948) said :
#2

/urs was a my error when typing this question. The solution by Andrew works correctly, I should have read the help document more thoroughly.
Thank you Andrew for your help.

Revision history for this message
Cam Nguyen (ctnguyen1948) said :
#3

Thanks Andrew Bennetts, that solved my question.