156 lines
6.2 KiB
HTML
156 lines
6.2 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>Source file management in a complex networked environment LG #50</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<A HREF="index.html"><IMG ALT="[ Table of Contents ]"
|
|
SRC="../gx/indexnew.gif" WIDTH=163 HEIGHT=60 ALIGN=bottom ></A>
|
|
<A HREF="../index.html"><IMG ALT="[ Front Page ]"
|
|
SRC="../gx/homenew.gif" WIDTH=163 HEIGHT=60 ALIGN=bottom></A>
|
|
<A HREF="pollman.html"><IMG ALT="[ Prev ]" SRC="../gx/back2.gif" WIDTH=41 HEIGHT=60 ALIGN=bottom></A>
|
|
<A HREF="../faq/index.html"><IMG ALT="[ Linux Gazette FAQ ]"
|
|
SRC="./../gx/dennis/faq.gif"WIDTH=163 HEIGHT=60 ALIGN=bottom></A>
|
|
<A HREF="silva.html"><IMG ALT="[ Next ]" SRC="../gx/fwd.gif" WIDTH=41 HEIGHT=60 ALIGN=bottom ></A>
|
|
<!-- *** END navbar *** -->
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">Source file management in a complex networked environment</font></H1>
|
|
<H4>By <a href="mailto:jrogers@visnetinc.com?subject=Re:cvs-ssh">James M. Rogers</a></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
|
|
When you have more than one person working on a project you need to
|
|
make sure that they don't overwrite each others changes. When you
|
|
only have a few directories then <A href="http://www.gnu.org/order/ftp.html">Revision Control System (RCS)</a> is
|
|
fine. But when you have dozens of projects with ten programmers and
|
|
your development environment is spread over several boxes, you have a project
|
|
management nightmare that RCS is just not up to handling.
|
|
<p>What you need is <A href="http://www.gnu.org/order/ftp.html">Concurent Version System (CVS)</A>. CVS is great
|
|
because it is network aware, works with entire directory trees and allows
|
|
multiple people to work on the same file at the same time without loosing
|
|
anyones changes. CVS is already installed in Redhat 6.0+.
|
|
<p>As great as CVS is it still allows your source code to go across the
|
|
internet without encrypting it. This month I am going to talk about
|
|
setting up a secure networked repository using Secure Shell (ssh).
|
|
Next month I will show you how to import your current projects into the
|
|
repository, how to check your code out, update files and check your code
|
|
back into the repository.
|
|
<br>
|
|
<ol>
|
|
<li>
|
|
Setup ssh on all of your boxes. This program is available <a href="ftp://sunsite.unc.edu/pub/packages/security/ssh/">here</a>. The company that makes ssh can be found <a href="http://ssh.com">here</a>.
|
|
</li>
|
|
|
|
<li>
|
|
Setup sshd to run on the machine that will host the repository.</li>
|
|
|
|
<li>
|
|
Create a new user account for each group of programmers on the machine
|
|
that is hosting the repository account. For this example create a
|
|
new user called repository.</li>
|
|
|
|
<li>
|
|
Create a .ssh directory on everyone ones accounts, including the new repository
|
|
accounts.</li>
|
|
|
|
<li>
|
|
Run 'chmod 700 .ssh' as the owner of the home directory on everyones account,
|
|
including the repository accounts.</li>
|
|
|
|
<li>
|
|
Have everyone create a public and private key using ssh-keygen.</li>
|
|
|
|
<li>
|
|
Collect everyones ~/.ssh/identity.pub files and place these into the ~/.ssh/authorized_keys
|
|
in the repository account if they are allowed to work on that project.</li>
|
|
|
|
<li>
|
|
Run 'chmod 700 ~/.ssh/authorized_keys' as the repository account.</li>
|
|
|
|
<li>
|
|
Test to make sure that people can use 'ssh repository@repository_host'
|
|
where repository is the name of the group directory and repository host
|
|
is the name of the host that has the repository.</li>
|
|
|
|
<li>
|
|
Create a directory called ~/cvsroot in the repository home directory.</li>
|
|
|
|
<li>
|
|
Setup the followint two environmental variables in whatever shell script
|
|
rc file you need to. For me it was my ~/.bashrc file:</li>
|
|
|
|
<p><br>export CVS_RSH=ssh
|
|
<br>export CVSROOT=repository@repository_home:/home/repository/cvsroot
|
|
<br>
|
|
<li>
|
|
Login to another window to ensure that you still can login and that these
|
|
environmental variables got set correctly.</li>
|
|
|
|
<li>
|
|
Do a 'cvs init' command as any user authorized to use this repository and
|
|
you should get no error messages.</li>
|
|
|
|
<li>
|
|
If you get any error messages, start over from scratch and repeat directions
|
|
until you get it works.</li>
|
|
|
|
<li>
|
|
If you have any questions please contact me.</li>
|
|
|
|
<li>
|
|
Take this oportunity to play with both SSH and CVS. Read the documentation,
|
|
see if you can think up of new ways of using them. If anyone has
|
|
another way of setting up cvs repositories, please share with us!
|
|
I am especially interested in finding out how to setup a public cvs repository
|
|
like I see on the internet all the time.</li>
|
|
</ol>
|
|
|
|
And if anyone was paying attention, this is also how you can setup all of your own accounts so that you only have to log on once to a secure machine and then connect to anyother machine without logging in again. I will discuss how to set that up in my next article in this series.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<P> <hr> <P>
|
|
<H5 ALIGN=center>
|
|
|
|
Copyright © 2000, James M. Rogers<BR>
|
|
Published in Issue 50 of <i>Linux Gazette</i>, February 2000</H5>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<!--startcut ==========================================================-->
|
|
<P> <HR> <P>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<A HREF="index.html"><IMG ALT="[ Table of Contents ]"
|
|
SRC="../gx/indexnew.gif" WIDTH=163 HEIGHT=60 ALIGN=bottom ></A>
|
|
<A HREF="../index.html"><IMG ALT="[ Front Page ]"
|
|
SRC="../gx/homenew.gif" WIDTH=163 HEIGHT=60 ALIGN=bottom></A>
|
|
<A HREF="pollman.html"><IMG ALT="[ Prev ]" SRC="../gx/back2.gif" WIDTH=41 HEIGHT=60 ALIGN=bottom></A>
|
|
<A HREF="../faq/index.html"><IMG ALT="[ Linux Gazette FAQ ]"
|
|
SRC="./../gx/dennis/faq.gif"WIDTH=163 HEIGHT=60 ALIGN=bottom></A>
|
|
<A HREF="silva.html"><IMG ALT="[ Next ]" SRC="../gx/fwd.gif" WIDTH=41 HEIGHT=60 ALIGN=bottom ></A>
|
|
<!-- *** END navbar *** -->
|
|
</BODY></HTML>
|
|
<!--endcut ============================================================-->
|