Setup bazaar over SSH server
Home > CentOS > CentOS 6.x > Versioning tools > Bazaar > Setup bazaar over SSH server
To setup bazaar over SSH use:
- First ensure that all users who are going to use the repository are in same user group.
- Enable SSH to machine by all users of this group
- Create a folder for storing bzr repository. Ideally folder should be located in common location such as '/opt/bzr' and not in some users home folder. To create folder use command 'bzr init-repo <folder_name>'
- Create a branch for working using command 'bzr init <repository_folder>/<branch_name>'
- Change permisssion on repository folder using 'chgrp -R <group_name> <folder_name>'
Using setup repository as central repository
Users can use configure bazaar repository as central repository. In this case users can use 'update' and 'commit' option to take changes from the central repository or to submit changes at central repository. In this case all commits would require access to central repository server. Steps for doing this are:
- Checkout bazaar branch using:
- bzr checkout bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
- Make changes to central repository using:
- touch a
- bzr add a
- bzr commit -m "Added a for testing"
- Take updates from central repository using:
- bzr up
Note that a warning 'This transport does not update the working tree of: bzr+ssh://saurabh@vlead/home/saurabh/bzrtest/branch1/. See 'bzr help working-trees' for more information.' may appear. This just means that on central repository server 'bzr up' should be run to make bazaar repository on central server up-to-date, if someone is going to work directly on central repository.
Using setup repository in decentralized manner
Bazaar supports decentralized development using local commits, push and pull mechanism same as git. To use bazaar repository in decentralized manner use:
- Clone bazaar repository using:
- bzr clone bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
- Make local changes to repository using
- touch a
- bzr add a
- bzr commit -m "Added a for testing"
- Push changes to central repository using
- bzr push bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
- Pull updates from central repository using
- bzr pull bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
If SSH access is provided only for bazaar and it is desired that users should not be able to perform any other activity then one can use Restricting SSH access to a given command configuration.
Home > CentOS > CentOS 6.x > Versioning tools > Bazaar > Setup bazaar over SSH server