3

I followed all the steps in https://help.ubuntu.com/8.04/serverguide/C/subversion.html but when I try to do:

svn co https://localhost/svn

I get:

 svn: Repository moved permanently to 'https://localhost/svn/'

...and when I do:

 svn co https://localhost/svn/

I get the same error again. When I try:

 svn co https://localhost/svn/testrepo

I get:

 svn: Could not open the requested SVN filesystem

In apache logs I see:

 can't open file /home/myname/testrepo/testrepo/format

In my apache2.conf I have:

<Location /svn>
     DAV svn
     SVNParentPath /home/myname/testrepo
     SVNListParentPath On
     AuthType Basic
     AuthName "myrepo"
     AuthUserFile /etc/subversion/passwd
     <LimitExcept GET PROPFIND OPTIONS REPORT>
         Require valid-user
     <LimitExcept>
</Location>

I also tried previously with "SVNPath" instead of "parentpath" without success.

Please help, I'm desperate!! I tried all combination of paths I could think of...

3 Answers 3

7

It seems as SVNParentPath is pointing directly to your repository, rather than to a directory that contains your repository.

Create a folder called projects in your home folder

mkdir /home/myname/projects

Move your repository into projects.

mv /home/myname/testrepo /home/myname/projects

Change the ownership of projects to www-data.

sudo chown -R www-data:www-data /home/myname/projects

In apache2.conf, change your declaration of SVNParentPath to

SVNParentPath /home/myname/projects

Restart your Apache server.

Now try checking out your repository.

svn co https://localhost/svn/testrepo
3
  • 1
    i dont understand how this worked because for me when i do SVNParentPath /home/myname/projects. and restart the apache server, i get an error saying "syntax error on apache2.conf" same line where i added "SVNParentPath /home/myname/projects"
    – Jono
    Jun 12, 2012 at 9:49
  • @jonney Is Correct, adding that line to the apache2.conf causes that error Nov 10, 2019 at 1:05
  • In my case, it turns out I made a mistake in the ./apache2/mods-enabled/dav_svn.conf file and trying to use my actual project location not the parent folder (up one dir ../<project>), in my case: "/storage/data/svn-database/" with my project being "/storage/data/svn-database/TestProject", I had to make sure my SVNParentPath in that file was set to the location of "ALL" the projects ./svn-database/ not the project ./TestProject ; After Correction and Restarting Apache, Project Finally works Nov 10, 2019 at 1:16
1

For Windows users (if someone has a similar problem under Windows):

The problem could be file access permissions.

I solved my problem by moving the repository to the location where Apache can read and write the files. In my case (CollabNet Subversion Edge) the path was C:\csvn\data\repositories.

0

Go to SVNParentPath Directory Here my directory path is /var/www/svn

cd /var/www/svn/

Create a Repository Under SVNParentPath

svnadmin create repo_name

Give Apache Permission

chown -R apache:apache repo_name/

Create a SVN User

htpasswd -m /etc/httpd/conf/.htpasswd username

Assign Permission

vi /etc/svnusers [repo_name:/]

username=rw

Restart Apache Service

service httpd restart

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .