access to repository forbidden

557 views Asked by At

I am getting access for repository forbidden while checking out the repository of svn. I have imported an existing repository in the newly installed svn server. All username and password are correct only. Kindly help.

If i access the url from browser then getting below error. Forbidden You don't have permission to access this resource

The error from the 'VisualSVN Server' event log:

Failed to load the AuthzVisualSVNSubversionReposRelativeAccessFile: An authz rule refers to group 'admin', which is undefined

1

There are 1 answers

9
bahrep On

You need to add permissions for your user account to access the imported repository. Having an account and knowing its password is insufficient. You need to grant this account access to your repository or project.

You need to follow these steps:

  1. Start the VisualSVN Server Manager console,
  2. Expand the Repositories node,
  3. Right-click the Repository and click Properties.
  4. Click the Security tab.
  5. Configure permissions for your user account on the Security tab and click Apply.

Note that you can also configure permissions using PowerShell.

See the article KB33: Understanding VisualSVN Server authorization for more information.

PS If these steps don't help, then you need to check the 'VisualSVN Server' event log in Windows Event Viewer. Do you see any errors?

Update #1

So we've found out the actual error message in the log:

Failed to load the AuthzVisualSVNSubversionReposRelativeAccessFile: An authz rule refers to group 'admin', which is undefined

It appears that there is a reference to a non-existent group in the file \path-to-repository-on-disk\conf\VisualSVN-SvnAuthz.ini (e.g., D:\Repositories\MyRepo\conf\VisualSVN-SvnAuthz.ini).

Possible reasons:

  • You were migrating your repositories from another VisualSVN Server instance and you did not copy the groups.conf file (e.g., D:\Repositories\groups.conf. The file groups.conf has a list of groups for the standalone Subversion authentication mode. Groups you've granted permissions to must be present in the file.

  • You somehow manually added a non-existent group into the VisualSVN-SvnAuthz.ini file. Perhaps again you've copied the file from somewhere without copying other configuration files, or you added the line into the authz file using notepad.exe.

To resolve the problem you may choose from these two different options:

  • Option A: Delete the VisualSVN-SvnAuthz.ini file and configure the permissions from scratch using VisualSVN Server Manager.

  • Option B: If you are migrating the repositories from another VisualSVN Server installation, make sure to copy the groups.conf and htpasswd files into the D:\Repositories directory on the new server. The first file has group account and describes their members. The second file has user account names and password hashes.

In either case, you need to review repository permissions after resolving the error.