TortoiseSVN Error: Unable to Connect to a repository at URL
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;
-
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. -
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://
orhttps://
URL to check this out. -
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 ansvn+ssh://
URL.
Related videos on Youtube
SidC
Desktop, web, business intelligence and mobile developer.
Updated on September 18, 2022Comments
-
SidC almost 2 years
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?
-
SidC over 12 yearsMod_dav_svn is installed.
-
ravi yarlagadda over 12 yearsThen can you provide the Apache configuration?
-
SidC over 12 yearsSounds like this is my issue. Would chmod 765 /subversion suffice?
-
Lazy Badger over 12 years@SidC - as usual, "It depends". I don't know, which user do you use for access, which groups include this user. For multi-user environment (svn:// or svn+ssh://) I prefer join users in group and operate at group-permissions level. Can't say exact value, but 5 for "other" seems as extra-soft limitation
-
SidC over 12 yearsI did chmod 777 /subversion and chown -R svnuser /subversion The issue still persists. How do I ensure that httpd process has r+w rights?
-
SidC over 12 yearsI also tried chown -R www-data /subversion/* but received Invalid User. Is www-data named something else in RHEL?
-
Lazy Badger over 12 yearsI don't know all distros. Try to find httpd-owner in /etc/ files (passwd and later groups?)
-
SidC over 12 yearsI was able to resolve this by doing chown -R apache /subversion/* which gives httpd/Apache the ability to own the subversion directory instead of root. I did a checkout to local file system, extracted contents of compressed file and added them successfully.