OSX comes with an installed version of Git if you have installed XCode. But as usual the Apple version is a very old version of Git. To have a current version of Git we can use the Git OSX installer hosted on google code. The installer installs all Git tools under
The configuration of Apache to service Git requests is documented here.
A better approach is to use gitolite if you have to administrate multiple projects and teams. How to install and configure gitosis is documented here.
Eclipse has a very good plugin for Git.
For OSX I use SourceTree Git application.
Since the version 3 of gitolite (released in May 2012) it seems to be possible to install gitolite directly under the Web Server process. Therefore it is no more necessary to create additional users for git and gitolite. Git and Gitolite are installed in regular folders. The user under which gitolite executes is the same as the web server process. The instructions are based on the location of gitolite in the variable GITOLITE_HTTP_HOME
Configure OSX to add gitolite to the path variable. You must create a file gitolite in /etc/paths.d add path to /etc/paths.d and add
Create gitolite location
Download gitolite and install it
Configure gitolite to support http access. See instructions for new version 3.0 of gitolite.
Create configuration file gitolite.conf in /etc/apache2/others
Create configuration file for Gitweb in /etc/gitweb.conf
Create configuration file for Apache server in /etc/apache2/others/gitweb.conf
Apache server location for the files to be served is defined with the ''DocumentRoot'' attribute in the main configuration file. Configure the web server to support HTTP and HTTPS protocols.
You should configure the access rights with a directory block to limit access to sensitive files.
Now that you are editing this file as root, you want to make it contain the following bits, and save:
Note that you can leave off all the authentication related stuff if you didn't want authentication on your repository. Also note that you need to fix the SVNParentPath and the AuthUserFile if you varied from my directions.
Now, if you didn't make a mistake, you should be ready! Try going to http://localhost/svn/reposname (where you need to put the repository name you chose earlier instead of ''reposname''!) and see what happens.
If you are lucky you'll see revision 0 of your repository. But most people are human and will have made a typo that results in an error. For hints on what created the error, trying checking out /var/log/system.log and /var/log/apache2/error_log for hints as to what you did wrong. (And as a bonus, the Console application works great for monitoring the logs as they are written to!)
Subversion use the WanDisco package and copy the new programs. You also need to copy the new Apache modules in the OS location.
So let's say you want to create your own subversion repository host on your Leopard box your own source code management goodness?
You could go to the subversion homepage and download the free Subversion book and sort through the instructions trying to figure out how they apply to you... Or you could follow these simple directions which I've laid out for you.
Now I decided to make my repository collection root directory be in /Users/Shared/, but you can really make it be anything you want, including the ever popular /usr/local. Just be sure to replace /Users/Shared/ with your directory of choice whenever necessary.
Anyway, I opened Terminal and entered the following commands:
or update existing repositories to the new subversion version with:
Note that you can create multiple repositories by following these directions but replacing every instance of "repository-name" with the name of the repository you want to use. Thus, if you have multiple repositories, you will have multiple directories in /Users/Shared/svn.
You might want to create a password file, unless you want full public access to your repository. For our purposes, simple http basic authentication is fine, but remember that the password is only weakly encoded and the traffic isn't encoded at all, so a snooper could get to the information if you access your computer outside of your own computer.
So if you do want to use authentication, create the password using the following command, substituting username for a user name of your choice, and following the directions for password creation:
To add other users to the file, just ditch the
Note that you can put the svn-auth-file anywhere you want, but this seemed like a good place for it in my mind. (Just remember where you hid it from yourself if you put it anywhere else).
Version Control with Subversion", which tells you everything you need to know, including how to make your server better!
WebSVN package is a set of PHP scripts allowing to browse and explore a SVN repository through a web browser interface.
You may wish to provide an authentication mechanism for WebSVN. One obvious solution is to protect the entire WebSVN directory with some form of Apache authentication mechanism, but that doesn't allow for per repository authentication. WebSVN provides and access rights mechanism that uses your SVN access file to control read access to the repository. This means that you only have to maintain one file to define both Subversion and WebSVN access rights.
For this to work, you need to configure your authentication method to the
sudo cp distconfig.php config.php
sudo nano config.php
add information in the file and activate
If necessary add read access to the root directory containing all repositories with the lines at the beginning of the Subversion access control file
The tool iF.SVNAdmin package is a set of PHP scripts allowing to manage SVN repositories. The tool is quite useful if you have quite a lot of users and projects. The management of repositories, users, groups, and access paths is quite comfortable.