Difference between revisions of "Svn notes"

From DiLab
Jump to: navigation, search
m (SVN client (GUIs))
Line 9: Line 9:
sudo apt-get install rapidsvn meld
sudo apt-get install rapidsvn meld


* [http://wiki.rabbitvcs.org/wiki/install/ubuntu '''Rabbitvcs'''] - inspired by tortoise
* [http://wiki.rabbitvcs.org/wiki/install/ubuntu '''Rabbitvcs'''] - inspired by TortoiseSvn, but for Linux



== Creating a basic SVN repository ==
== Creating a basic SVN repository ==

Revision as of 10:30, 12 July 2010

Good start for basic subversion info is at https://help.ubuntu.com/community/Subversion

You may also want to read how to add a group or user to a group.

SVN client (GUIs)

Here is the list of my favorite clients for SVN

  • Rapidsvn for version control and meld for comparing files
sudo apt-get install rapidsvn meld
  • Rabbitvcs - inspired by TortoiseSvn, but for Linux

Creating a basic SVN repository

Decide where your repository will be. Private could be under your home, public probably be somewhere else, e.g. at /var/lib/svn/ourproject/. This example creates a repository in /home/svn/myproject/.

sudo mkdir /home/svn
cd /home/svn
sudo mkdir myproject

sudo svnadmin create /home/svn/myproject

cd /home/svn
sudo chown -R www-data:subversion myproject
sudo chmod -R g+rws myproject


Global ignore

  • Where to set the pattern for files to be ignored:

You can modify /etc/subversion/config like this

[miscellany]
global-ignores = *.class *.o tmp


  • How to use a different username for a svn client (for example, rapidsvn)
SVN_SSH='ssh -l username' rapidsvn

Single unix account, multiple users access with public key authorization

Here is a description on how to set up svn on a single unix account and using private-public key authorization for multiple users.

In short: edit .ssh/authorized_keys file by adding lines as follows:

Consider

ssh-rsa AAAABlotsmoregookhere= address@example.com 

as "TYPE KEY COMMENT". Then add the following lines, one prer user:

 command="/path/to/svnserve -t -r /repository/root --tunnel-user=alice",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty TYPE1 KEY1 COMMENT1
 command="/path/to/svnserve -t -r /repository/root --tunnel-user=bob",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty TYPE2 KEY2 COMMENT2

Now you can have users authenticating the svn access with their private/public keys, using a single svn/unix account.

If you do not know how to generate the keys, here is how: Ssh_with_a_private-public_key