Git SVN Setup

Install missing SVN packages

sudo apt-get install git-svn
sudo apt-get install subversion libapache2-svn 

Credentials

In order for gitman to interact with git svn, it must be configured to store your SVN credentials (cached) for private repository access.

To test, trying cloning one of your private repositories:

$ git svn clone -r <rev> <repo>

Option 1: Enter manually credentials

If authentication realm is not already properly configured then Username and Password needs to be entered.

For example:

$ git svn clone -r HEAD http://my-svn-repo/trunk/MyDirectory
Initialized empty Git repository in /home/Dev/MyDirectory/.git/
Authentication realm: <http://my-svn-repo:80> my-svn-repo repository access
Username: JohnDoe
Password for 'John Doe'

This credentials should be cached afterwards. For further information about caching credentials see here.

Option 2: Manually store Credentials

  1. Generate the MD5 hash of the realmstring of the repository provider.
  2. Create a file under /home//.subversion/auth/svn.simple, where the filename is the md5 hash. This is how git svn will find the credentials when challenged.
  3. The content of the file will have key value pairs as shown below:
K 8
passtype
V 6
simple
K 8
password
V <password character count>
<password>
K 15
svn:realmstring
V 50
<repo> <repo name>
K 8
username
V <username character count>
<username>
END
  1. Now both git svn and svn should be able to check out from the repo without asking for credentials.