2

I recently did some reorganizing of my repositories. To speed things up, I decided to use pipes instead of temporary files and GUIs:

Inside of VisualSVN's "Repositories Root" directory, I did this:

svnadmin create proj1
svnadmin dump common | svndumpfilter include trunk/proj1 | svnadmin load proj1 > NUL 2> NUL

Now, when I open up my VisualSVN Server manager, I see the new repositories under the "Repositories" folder, and browsing shows the data is what I wanted. They even seem to appropriately inherit permissions. "Verify Repository..." succeeds.

But when I use the web-browser, or an SVN client to inspect the repository, I get:

$ svn checkout https://svn.mycompany.com/svn/proj1
svn: E170013: Unable to connect to a repository at URL 'https://svn.mycompany.com/svn/proj1'
svn: E175013: Access to '/svn/proj1' forbidden

(it's the same message for a project that I know doesn't exist).

How do I get VisualSVN to serve this repository?

The "Import Existing Repository" function only supports "copy" or "load from dump", both of which I've already done. If I choose the "copy from another location" and choose the repo, I get "A repository named proj1 already exists. Please pick another name".

I've also tried restarting the service.

0

1 Answer 1

1

As far as I can see, you used the svnadmin create command to create your new repository. It doesn't create the authz files that should be present in the repository's /conf directory. When these files are missing, access to the repository is forbidden (because this is considered to be unexpected and has to be fixed).

You can identify this issue by checking the 'VisualSVN Server' event log in Windows Event Viewer. I think that you will see several error-level events about missing VisualSVN-WinAuthz.ini or VisualSVN-SvnAuthz.ini files.

And if it's the case, you can resolve this issue by making VisualSVN Server create the missing files. The easiest way is to open the VisualSVN Server Manager console, right-click the new repository and select Properties. Make any change to user permissions and roll back this change (if you don't actually make any changes to permissions). Then click Apply. So, this is going to be a no-op change that creates the missing authz file.

In the future, please use the New-SvnRepository PowerShell cmdlet to create repositories from the command prompt. Running this cmdlet creates a new repository and all the necessary configuration files.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, making a trivial change to the permissions (and then undoing it) did indeed regenerate the missing piece. Note that the conf/authz file did exist. It was indeed conf/VisualSVN-WinAuthz.ini that was missing and which was generated.
And yes, I can confirm that replacing svnadmin create with New-SvnRepository works well with a live VisualSVN server and avoids that problem. This is the only windows machine I've touched in the past 6 years, so PowerShell is not something I dive into often.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.