Git SVN Setup
Install missing SVN packages
1 2 | 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:
1 | $ 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:
1 2 3 4 5 | $ 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
- Generate the MD5 hash of the realmstring of the repository provider.
- Create a file under /home/
/.subversion/auth/svn.simple, where the filename is the md5 hash. This is how git svnwill find the credentials when challenged. - The content of the file will have key value pairs as shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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 |
- Now both
git svnandsvnshould be able to check out from the repo without asking for credentials.