I already figured I can run the server by running (assuming repository is in /var/bzr):
bzr server --directory=/var/bzr
But now a couple of questions arises:
This doesn't solve a problem of starting bazaar automatically when server boots. I assume the best way would be to make a script in /etc/init.d that would run and stop bazaar server when appropriate, then put symlinks to it into /etc/rc.d/*. If you have an example of said script, please show it. Especially how to properly stop server (the very instance we started), starting is pretty obvious.
Security. I think the best approach would be to create a dedicated user (with a login, say, bzr), give that user permissions only to repository directory and run server as this user.
How to commit to this central repository? If I try to commit remotely, I get this message: "bzr: ERROR: Cannot lock LockDir(filtered-169532780:///StreetCleaner/.bzr/branch/lock): Transport operation not possible: readonly transport" Does this mean I can only commit/merge when logged via ssh? If so, do you have anything that can simplify the process?
Is there any way to add some kind of authentication to bazaar server?
I'm on Ubuntu 10.04.
I would recommend using Supervisor to automatically start and stop the service on boot/shutdown
Agreed
By default the
bzr server
command gives a read-only server, you have to add the--allow-writes
argument to enable writing.Unfortunately
bzr server
has no authentication build-in. If you want authentication than I recommend usingbzr+ssh
orbzr+https
. Here's a guide for using a webserver: http://doc.bazaar.canonical.com/latest/en/user-guide/http_smart_server.html