Sunday, 17 April 2016

How to setup CVS with SSH access on Linux ?


1. Make directory to indicate CVS root. Give permission to the parent folder.
  mkdir -p /var/cvs/cvsroot
  chown cvs.cvsgrp -R /var/cvs

2. Set the path or export the path variables
  export CVSROOT=/var/cvs/cvsroot
  CVS_RSH=/usr/bin/ssh

3. Go to CVS root directory using the variable
  cd $CVSROOT

5. Initialize the CVS
  cvs init

6. Change to the source directory, in this case it was /home/cvs/SEATV2

7. Import the source to the repo.
  cvs import -m "repo test" cvstest vendortag releasetag

8. Give the permission to the folder.
    chown cvs.cvsgrp -R /var/cvs/cvsroot/cvstest

9. Create a user
  adduser -G cvsgrp user2
    and provide password
    passwd user2

10. Add "user2" to the file /var/cvs/cvsroot/CVSROOT/passwd

11. Check-Out code
   cvs -d:ext:user2@localhost:/var/cvs/cvsroot co cvstest

For future use, add a (UNIX) user, give him a password, add him to cvs-group (with -G in useradd)
and add the username to the /var/cvs/cvsroot/CVSROOT/passwd file.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.