User Tools

Site Tools


using_subversion_from_unix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
using_subversion_from_unix [2008/03/26 09:21] – created jtkorbusing_subversion_from_unix [2008/03/26 09:54] jtkorb
Line 1: Line 1:
-====== Using Subversion for SECANT Projects ====== +====== Accessing a Subversion Repository ======
- +
-A SECANT project repository is available using [[http://subversion.tigris.org|Subversion (svn)]] at ''secant.cs.purdue.edu'' This page explains how project members should use it.  See [[svn-admin|this page]] for setup and administrative information. +
- +
-This page is primarily for UNIX users.  Windows instructions are [[svn-windows|here]]. +
  
 +This page explains how to access a [[http://subversion.tigris.org|Subversion (svn)]] repository.  This page is primarily for UNIX and Mac (Leopard) users.  Windows instructions are [[using_subversion_from_windows|here]].  See [[administering_subversion|this page]] for setup and administrative information.
  
 ====== Creating an SSH Key for Access to the Repository ====== ====== Creating an SSH Key for Access to the Repository ======
  
-On a UNIX system, use ''ssh-keygen'' to create a public/private key pair.  Give it a SECANT-specific name (to distinguish it from any other ssh keys you may have) and store it in the default directory (''~/.ssh''): +On a UNIX system, use ''ssh-keygen'' to create a public/private key pair.  Give it a host-specific name (to distinguish it from any other ssh keys you may have) and store it in the default directory (''~/.ssh''):
- +
-  % ssh-keygen -t rsa -f ~/.ssh/id_rsa_secant +
- +
-''ssh-keygen'' will prompt you for a passphrase to lock the key.  This protection is not necessary; you can skip it by pressing ''ENTER'' twice.  ''ssh-keygen'' will create two files in your ''~/.ssh'' directory, with the private key in ''id_rsa_secant'' and the public key in ''id_rsa_secant.pub''.  +
  
-Send [[jtk@cs.purdue.edu|me]] a copy of your public key file, ''id_rsa_secant.pub'' I will then create an svn account for you and tie your public key to that account.+  % ssh-keygen -t rsa -f ~/.ssh/id_rsa_svn1
  
 +''ssh-keygen'' will prompt you for a passphrase to lock the key.  This protection is not necessary; you can skip it by pressing ''ENTER'' twice.  ''ssh-keygen'' will create two files in your ''~/.ssh'' directory, with the private key in ''id_rsa_svn1'' and the public key in ''id_rsa_svn1.pub''.  
  
 +Send the repository administrator a copy of your public key file, ''id_rsa_svn1.pub'', who will then create an svn account for you and tie your public key to that account.
  
 ====== Setting Up Your Working Environment for Repository Access ====== ====== Setting Up Your Working Environment for Repository Access ======
  
-While waiting for me to create your svn account, you can read the svn [[http://svnbook.red-bean.com/en/1.4/svn.tour.html|tour]] or [[http://subversion.tigris.org|other]] documentation and set up your UNIX environment for svn access.+While waiting for the administrator to create your svn account, you can read the svn [[http://svnbook.red-bean.com/en/1.4/svn.tour.html|tour]] or [[http://subversion.tigris.org|other]] documentation and set up your UNIX environment for svn access.
  
-If you're only dealing with this one repository (i.e., you're not involved in any other projects that use svn), then it is simplest to just set the ''SVN_SSH'' environment variable to turn on ssh key access and log you in to the cp-wiki account.  For example, bash users edit ''~/.bashrc'' to include:+If you're only dealing with this one repository (i.e., you're not involved in any other projects that use svn), then it is simplest to just set the ''SVN_SSH'' environment variable to turn on ssh key access and log you in to the server account.  For example, bash users edit ''~/.bashrc'' to include (note that ''svn_login'' is specific to the host where the repository is stored; your administrator should provide this information):
  
-  SVN_SSH="ssh -i $HOME/.ssh/id_rsa_secant -l cp-wiki"+  SVN_SSH="ssh -i $HOME/.ssh/id_rsa_svn1 -l svn_login"
   export SVN_SSH   export SVN_SSH
  
-Once your svn account is created, cd to a suitable directory and get a copy of the repository:+Once your svn account is created, cd to a suitable directory and get a copy of the repository (''host'' is also site specific and should be provided by your administrator):
  
-  % cd secant +  % svn checkout svn+ssh://host.cs.purdue.edu repository
-  % svn checkout svn+ssh://secant.cs.purdue.edu repository+
  
-These commands move into your secant directory and create a ''repository'' subdirectory with a complete copy of the SECANT source code repository.  The repository is organized as [[http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout|recommended by the svn community]]: one directory per "project", with each project containing a ''branches'', ''tags'', and ''trunk'' subdirectory.  You'll notice that the repository directory contains two subdirectories: skeletons for "project1" and "project2" The main place to create files (e.g., python source code) is in the ''trunk'' directory.  Start there.+These commands create a ''repository'' subdirectory with a complete copy of the source code repository.  The repository may be organized as [[http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout|recommended by the svn community]]: one directory per "project", with each project containing a ''branches'', ''tags'', and ''trunk'' subdirectory.  You'll notice that the repository directory contains two subdirectories: skeletons for "project1" and "project2" The main place to create files (e.g., source code) is in the ''trunk'' directory.  Start there.
  
 ====== Creating a New Project ====== ====== Creating a New Project ======
using_subversion_from_unix.txt · Last modified: 2010/06/28 12:36 by jtkorb