TortoiseSVN Error: Unable to Connect to a repository at URL

I'm using TortoiseSVN to connect to a newly-created repository on my RHEL server. I did svnadmin create reponame as root to create the repository. I simply want to checkout the repository using TortoiseSVN so that I can add files to it.

I installed mod_dav_svn and can now connect and checkout the repository. On my local machine, I added files to the directory and tried to commit. However, TortoiseSVN now gives

Can't open file '/subversion/langantiques/db/txn-current-lock': Permission
denied

How do I rectify this one?


Solution 1:

If you created repo as root (with with umask, BTW) and later try to access repo with W action as local user with file:/// protocol (all mentioned parts in sentence are important) you have ordinary permission problem: user, under which you run svn process, have to have sufficient rights to work with repo. Chown or chmod or chgrp repo dir, as needed (I'm not a shaman to see your FS)

If your repo served by Apache - httpd process must have +r+w rights on repo

Solution 2:

You'll need something to serve the repository to remote nodes. There are three main options;

  1. svnserve

    This is a simple service that runs on port 3690 that allows access to your repository. It's pretty basic; it can enforce permissions settings but has no encryption for its network traffic (including passwords). You'd run the service (which is probably installed already on your server) and then run the checkout with an svn:// URL.

  2. WebDAV

    This option requires a web server - probably Apache, with the mod_dav_svn module. You can configure security (authentication and encryption) in the web server, as well as access controls; this is probably the most flexible of the options for this reason. You'd use an http:// or https:// URL to check this out.

  3. SSH

    This option uses the SSH setup that you've probably already got configured; in this way it gets good authentication and encryption. But, since it's using the linux users, you'll need to jump through some hoops to lock down any user that you want to have SVN access but not shell access. This also requires some wrangling to get the SSH connectivity working - last time I messed with it it involved feeding tortoise the plink.exe file from PuTTY. You'd access this with an svn+ssh:// URL.