Question

I am building an SVN repository on a public IP server at work so that some Devs including myself can access it from anywhere not just from the office. I was wondering how do I get the URL for the SVN Repository i know a local one is file:///svn_repos but I've never tried to do anything like this before. Sorry if I seem like a complete idiot.

Was it helpful?

Solution 2

Download and install Subversion Edge on the server:

http://www.collab.net/downloads/subversion

This will give you a simple web UI for managing your server and repositories. Your clients will be able to access your repositories via http or https.

OTHER TIPS

You have to connect your svn server with apache running on the same box.

This might help you http://subversion.apache.org/packages.html

For Windows, follow these steps : https://www.inetsolution.com/blog/july-2007/how-to-setup-subversion-apache-websvn-on-windo (never tested but it seems right)

For Linux, you need apache, subversion and mod_dav_svn (install it with apt-get, yum or whatsoever)

  1. Install apache
  2. Install subversion
  3. Install mod_dav_svn

Then you have to configure everything. In apache configuration, you add this :

<Location /svn>
  DAV svn
  SVNParentPath /var/www/svnrepo
  AuthType Basic
  AuthName "Subversion repositories"
  AuthUserFile /etc/svn-auth-users
  Require valid-user
  SSLRequireSSL
</Location>

You create your certificate :

openssl req -new > YOUR_SERVER.certificate.csr
openssl rsa -in privkey.pem -out YOUR_SERVER.certificate.key
openssl x509 -in YOUR_SERVER.certificate.csr -out YOUR_SERVER.certificate.cert -req -      signkey YOUR_SERVER.certificate.key -days 1024
mv YOUR_SERVER.certificate.cert /etc/pki/tls/certs/
mv YOUR_SERVER.certificate.key /etc/pki/tls/private/
vim /etc/httpd/conf.d/ssl.conf

You create your users :

htpasswd -cm /etc/svn-auth-users YOUR_USERNAME

You create and configure your svn server :

cd /var/www
mkdir svn
cd svn
svnadmin create YOUR_PROJECT_NAME
chown -R apache.apache YOUR_PROJECT_NAME
chcon -h system_u:object_r:httpd_sys_content_t /var/www/svnrepo/YOUR_PROJECT_NAME
chcon -R -h apache:object_r:httpd_sys_content_t /var/www/svnrepo/YOUR_PROJECT_NAME/*

mkdir -p /var/svn_template/{trunk,branches,tags}
svn import -m 'Initial import' /var/svn_template/ https://localhost/svn/YOUR_PROJECT_NAME/
service httpd restart

I have done this on several Fedora servers and it works very well.

Then, you can access your svn server at this address : https://YOUR_SERVER_ADDRESS/svn/YOUR_PROJECT_NAME/ with your YOUR_USERNAME account (and its password )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top