Subversion: access to repository forbidden

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible


When trying to connect to a Subversion repository through a Script Task in Bamboo, an error is thrown to the logs saying that Bamboo is unable to connect to the repository and that the access is forbidden.


Bamboo and a Subversion repository, using a Script Task.


Build logs show the following:

Build logs
error	28-May-2021 10:35:45	svn: E170013: Commit failed (details follow):
error	28-May-2021 10:35:45	svn: E170013: Unable to connect to a repository at URL '<REPO_URL>'
error	28-May-2021 10:35:45	svn: E175013: Access to '<REPO_URL>' forbidden


The following table contains a list of possible causes for this issue, which should be ruled out one by one until finding the root cause.

Bamboo server-side checks


Does the account being used to connect to the SVN repo have all required permissions?

You can get the Forbidden error if your user account lacks access permissions to a repository or repository path; it makes sense to check authorization settings for your user account. Make sure your system administrator has provided you with all required access to that repository path.

Is the correct repository URL being used?

URLs in Subversion are case-sensitiveTry copying the checkout path directly from the SVN server itself to ensure it is accurate.

Are you getting this error within Bamboo only?

This helps clarifying if the issue is related with Bamboo, or with the system / Subversion itself.

A great way to test this is to run the same script from the Script Task using the Terminal on the Bamboo host server.

Are you able to commit code outside Bamboo, in the same machine?

Does it work fine on specific agents?

If it works on an agent but doesn't on a different one, the issue must be related to the agent environment.

Does a different SVN command work?

Say you're having issues with committing code to the repository. Are the errors still present when using a different command? If everything fails, it's most probably a permission related issue. 

E.g., try running the following command to retrieve repository information and see if either succeeds or fails with the same error:

svn info <repo-url>

SVN-side checks


Subversion logs

Try checking the logs from the Subversion server itself. They might contain useful information about what's happening when the Bamboo requests arrive in SVN.

Logging levels

Follow this guide, Troubleshooting Subversion, to enable the “FINEST” level of debugging.


Windows OS

If the issue persists after validating all topics mentioned above, and you're running Bamboo on a Windows machine, the root cause could be that Windows is ignoring the credentials you're passing in the Script Task, and replacing them with its own domain credentials, thus causing the forbidden access errors.
The solution for this is to add the option below at the end of the SVN script, so that it prevents Windows credentials from being shared:

--config-option servers:global:http-auth-types=basic

Last modified on Sep 22, 2021

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.