I recently set up an svn repo with authentication.
Our PC users are using tortoise SVN and are able to checkout, commit, etc.
Our Mac OS users are using SmartSVN and when trying to checkout they get the following error:
Repository moved permanently; please relocate OPTIONS
request failed on'/'
I ran into this issue when setting it up initially with tortoisesvn and the solution was making sure that that svn repo wasn't a child of the www directory. So I placed it in the home directory
The home directory looks like the following:
/public_html
/repos
/www
The vhost conf file looks like:
<IfModule mod_dav_svn.c>
<Location /repos/>
DAV svn
SVNParentPath /data/svn/repos/
SVNListParentPath On
AuthType Basic
AuthName "SVN Repository"
AuthUserFile /data/svn/.htpasswds/.svn.htpasswd
AuthzSVNAccessFile /data/svn/.htpasswds/.svn.authz
Require valid-user
</Location>
</IfModule>
Both PC and Mac users are able to view the repositories with the proper authentication in a browser. The only issue is when trying to checkout when using SmartSVN on MacOS.
There aren't any errors in the log that I can see that relate.
Edit: Clarification
All users are checking out the repos with a url format like:
http://svn.myserver.com/repos/REPONAME
Both PC and Mac users are able to view the repositories with the proper authentication in a browser
Browser in your case is not the best testing-tool. CLI-based SVN-client will give more details about problem
In your case Mac-users (I suppose) tried to read repository root, not repository (it's possible in browser only with SVNListParentPath On in config, as you have). Any SVN client on any OS (for current stable 1.7) can not read SVNParentPath (promised to be changed in 1.8) and must to use
svn ls SERVER/repos/REPONAME as minimal root-level for single repository
Originally our svn was using a single repository and we changed it to use a collection of repositories. We were still using the same subdomain "svn.server.com" with the main difference that our collection is now svn.server.com/repos/
SmartSVN stored the old url "svn.server.com" and seemed to ignore the new supplied url during checkout (svn.server.com/repos/TEST)
The solution is simple.
SmartSVN > Preferences > Authentication
Delete the old record and then try to check out again.
Related
I'm having trouble setting up my Subversion.
I'm currently able to access repository directories within the parent directory. i.e http://server.com/svn/project but I receive a Forbidden error if I try to access the parent directory directly http://server.com/svn/
Ideally, I would like to be able to see all my repositories from a single url so I'm trying to get this configured properly.
I have looked at /etc/apache2/conf.d/subversion.conf and I have set
<Location /svn>
DAV svn
SVNParentPath /usr/local/svn
SVNListParentPath on
AuthType Basic
AuthName "My SVN"
AuthUserFile /etc/apache2/conf/user_authentication.conf
AuthzSVNAccessFile /etc/apache2/conf/svn_authorization.conf
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
In /etc/apache2/conf/svn_authorization.conf I have configured
[/]
* = r
[project:/]
user1 = rw
etc..
I'm not quite sure why I am getting forbidden on parent since I believe I have read enabled for all users. I have even tried removing the * = r and putting myUsername = r but still forbidden.
What am I doing wrong?
Subversion won't show you the parent path directly. So "out of the box" you can't get the list of repositories this way. When using the web browser to access your repository, you should use viewvc, because that has many advantages to directly pointing the browser at the repository location (i.e. you can browse the history that way). If you're using a bundled SVN installation such as CollabNet, viewvc is automatically configured for your server, too.
I am trying to create subversion repository mirror in a remote server using "svnsync" through command line and the actual repo is located in different remote server.I am able to access this repo from SVNSLIK, but not able to connect subversion of windows compatible
command:
svnsync init file:///repository http://repoURL/trunk/repoName --source-username AAA --source-password PWD
Authentication realm: XXX
Username: AAA Password: PWD
Again asked username and password, even i entered correct authentication info, thrown error.
Error: svnsync:E215004:Unable to connect to a repository at URL http://repoURL/trunk/repoName
Plz help me on this.
I escaped from the problem. In source server(where source code repository exists), subversion client with version - win32svn1.6 was installed. But in destination server, I installed win32svn1.8. May be this is causing the problem. So, I uninstalled win32svn1.8 (from destination server), then installed subversion client with version win32svn1.7. Now it working perfectly for me.
I understand this is an old thread (asked 3years ago as of this posting) but I can provide a different perspective for other users in same scenario.
My source repo was 1.6 and destination was the current svn 1.9.4 on CentOS 6.8. I got the same error
E215004: No more credentials or we tried too manytimes
I have another repo syncing (svn1.6 -> svn1.9) and it was working fine so I compared the config. The other working repo has
SVNPath /var/www/svn_repos/XXX
While this new one has
SVNParentPath /var/www/svn
Per http://svnbook.red-bean.com/en/1.6/svn.ref.mod_dav_svn.conf.html, those 2 cannot go at the same time. If I change one for the other, I risk breaking the automation apps using this new repo. I don't know the intimate difference between those two (SVNParentPath vs SVNPath) but I tried creating a different config in my /etc/httpd/conf.d/subversion.conf
<Location /appX-sync>
DAV svn
SVNPath /var/www/svn/appX
<LimitExcept GET PROPFIND OPTIONS REPORT>
# Require SSL connection for password protection.
SSLRequireSSL
Order deny,allow
Deny from all
allow from localhost
allow from 1.2.3.40
allow from 1.2.3.50
</LimitExcept>
</Location>
And when I re-run the svnsync, it worked!
Hoping somebody can shed some guru-knowledge here as we've been racking our brains trying to figure out what is causing this error.
We're running WHM/CPanel on CENTOS 5.8
We have a sub-domain specifically set up to server as an svn repository.
We've created the VirtualHost directory and config file. The config file looks like the following:
<IfModule mod_dav_svn.c>
<Location />
DAV svn
SVNParentPath /home/<username>/public_html/svn
SVNListParentPath On
AuthType Basic
AuthName "SVN Repo"
AuthUserFile /home/<username>/.svn.htpasswd
Require valid-user
</Location>
</IfModule>
We're using SVNParentPath because we will have multiple repositories.
Our repo's are created using svnadmin create
They show up fine when we navigate to them in a browser. We can see the top level folders. When we click into them all we see is the revision number. I'm pretty sure this is normal.
In Tortoise we connect to the repo like: http://svn.ourserver.com/reponame
We've been through any and every forum post we can think of and just cannot get passed the redirect cycle. Any knowledge will be greatly appreciated.
edit
I should add that we are getting the authentication windows so I believe that that part is setup correctly.
As it turns out I think this was more of a misunderstanding of how svn is setup and how tortoiseSVN needs to access it. Tortoise can't check out multiple projects (which we knew.) What we overlooked is that creating a repository, isn't the same as creating a project.
Once we converted the svn.mydomain.com to be a repo itself, created a project within that, we were able to check it out without error.
I want to thank everyone that tried to help. I really appreciate your time.
Repo location in site-root may have big bad impact later (if you'll have not-dav parts of site under ROOT)
SVNParentPath /home/<username>/public_html/svn/ (trailing slash) will be better, can't recall why
I am a bit confuses finding the SVN URL to check out a copy on my computer.
The way I get to my website is: http://dev.website.com/
I have set up SVN here: /home/svn/trunk
And I checkout a copy here: /var/www/trunk
Sso http://dev.website.com/ points to /var/www/trunk.
But I need to checkout a copy of the trunk on my computer. And I try to go to http://dev.website.com/ or http://svn.dev.website.com/, but it doesn't work.
What is the URL that gets me the files from the trunk? Where do I need to set that link up?
You must not "guess and try", but find the location of your repository in file httpd.conf.
In order to do it, read the Apache configuration, and find the DAV svn string in it. Location container, which has this string, location parameter will have the path, used as repository path in case of a single repository or base-path for multi-repository.
Example
For host http://mayorat.ursinecorner.ru:8088 with configuration (part of)
<Location /svn/>
DAV svn
SVNListParentPath on
SVNParentPath physical-path
path to any repository, created under SVNParentPath directory, will be
mayorat.ursinecorner.ru:8088/svn/Repo-dir-name/
I come from a GIT background and now have to work using SVN.
Usually, when working with GIT, I had Apache virtual host set up to one folder as document root and when I wanted to switch branches I just did git checkout branch.
From what I see with SVN now, when I make branches I have to make a new folder for each branch. Is that true or is there some other way to accomplish to what I'm used to with GIT?
Because, that would mean I have to make a number of different virtual hosts or use wildcard dns or something.
Thanx.
You could use svn switch to switch your working copy to a different branch, if you want to keep it in the same directory.
In Subversion branching is just copying a tree so yes, you would be creating a new folder. Have a look at the SVN book for their chapter on branching/merging: http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html
There's no natural mapping between virtual hosts and version control systems like Subversion or git so I'm afraid I can't comment on how it might relate to your different vHosts. Maybe you could talk about your setup a little more.
If you are having something like:
<VirtualHost [server's IP address]:443>
ServerName svn.example.com
<Location />
DAV svn
AuthType Basic
AuthName "svn.example.com"
AuthUserFile /var/local/svn/svn.example.com/conf/passwd
AuthzSVNAccessFile /var/local/svn/svn.example.com/conf/authz
SVNPath /var/local/svn/svn.example.com
Require valid-user
</Location>
</VirtualHost>
you don't have to worry about handling different branches explicitly.
A way to accomplish what you are used to with git is to use git-svn.