<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch02-svnssh">
<title>Subversion SSH Access (for editors)</title>
<?dbhtml filename="svnssh.html"?>

<para>For editors, access is slightly more complicated. You first of all need
to generate an ssh key-pair. You then need to upload your public key into your
<filename>~/.ssh</filename> directory on belgarath. To generate the keys run:
</para>

<para><screen><userinput>ssh-keygen -t dsa</userinput></screen></para>

<para>When prompted as to where to save them, it's probably best to leave
them in .ssh (as <filename>id_dsa</filename> and
<filename>id_dsa.pub</filename>) unless you already have ssh keys there.
When prompted for a passphrase just press enter (unless you want to have
to give the phrase <emphasis>every</emphasis> time you perform a subversion
operation.  But, since the same passphrase will be used when you log in to
<emphasis>belgarath</emphasis> over ssh, it may be advisable to have some
security in place.   Having generated your keys, upload
<filename>~/.ssh/id_dsa.pub</filename> to belgarath and move it to
<filename>~/.ssh/authorized_keys2</filename> <emphasis>on
belgarath</emphasis>.  (Your local copy of <filename>id_dsa</filename>
and <filename>id_dsa.pub</filename> should remain untouched by
this.) Make sure that the ~/.ssh directory on belgarath is mode 700:</para>

<screen><userinput>chmod -R 700 ~/.ssh</userinput></screen>

<para>Once you have this setup, try to checkout the latest LFS book revision by
running:</para>

<screen><userinput>svn checkout svn+ssh://svn.linuxfromscratch.org/LFS/trunk/BOOK lfs-trunk
</userinput></screen>

<para>If this works, you'll checkout a copy of the current book to
<filename class="directory">lfs-trunk</filename> and you will have your own
local working copy.  You will also have write access so from now on be extra
careful, but note that <emphasis>no</emphasis> changes will be made until you
issue a <userinput>svn commit</userinput> command.</para>

<para>The above is fine for working in trunk, and you can checkout an individual
branch in a similar manner.  But, merging changes between branches is much
easier if you check out the whole tree by running:</para>

<screen><userinput>svn checkout svn+ssh://svn.linuxfromscratch.org/LFS LFS
</userinput></screen>

<para>The drawback to checking out the whole tree is that you will currently
get about 102M of data instead of 5M.</para>

<para>As with anonymous access, you can update your local copy by simply
<command>cd</command>'ing into the LFS directory and running:</para>

<para><screen><userinput>svn update</userinput></screen></para>


</sect1>
