Difference between revisions of "Setup bazaar over SSH server"

From Notes_Wiki
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb>Bazaar</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Versioning tools]] > [[Bazaar]] > [[Setup bazaar over SSH server]]
=Setup bazaar over SSH server=


To setup bazaar over SSH use:
To setup bazaar over SSH use:
Line 58: Line 57:




<yambe:breadcrumb>Bazaar</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Versioning tools]] > [[Bazaar]] > [[Setup bazaar over SSH server]]

Latest revision as of 15:46, 24 August 2022

Home > CentOS > CentOS 6.x > Versioning tools > Bazaar > Setup bazaar over SSH server

To setup bazaar over SSH use:

  1. First ensure that all users who are going to use the repository are in same user group.
  2. Enable SSH to machine by all users of this group
  3. 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>'
  4. Create a branch for working using command 'bzr init <repository_folder>/<branch_name>'
  5. 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:

  1. Checkout bazaar branch using:
    bzr checkout bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
  2. Make changes to central repository using:
    touch a
    bzr add a
    bzr commit -m "Added a for testing"
  3. 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:

  1. Clone bazaar repository using:
    bzr clone bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
  2. Make local changes to repository using
    touch a
    bzr add a
    bzr commit -m "Added a for testing"
  3. Push changes to central repository using
    bzr push bzr+ssh://<ssh_username>@<machine_ip_or_name><branch_path>
  4. 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