Search code examples
svntortoisesvn

SVN "access to '/svn/myproject' forbidden, but only with Tortoise


I'm trying to use tortoise to check out a projet with a virtual machine, but I get the

Unable to connect to a repository 'http://svn.mycompany/svn/myproject' Access to /svn/myproject' forbidden

But it's not a right problem, because from my physical computer, I can do it with the same account (it oppens the Windows identification pop-up everytime) with no problem (wether it be with tortoise, eclipse svn, chrome, etc.).

I can also access http://svn.mycompany/svn/ with no problem on my VM and see the "myproject" folder.

Even worst: on my VM, I dont have any problem with both URLs using internet explorer, and eclipse's subversion.

Tortoise on my physical computer doesn't have any proxy configured, and so does the one my VM. Maybe it uses IE's proxy or something like that ?

I've looked at other question but most of them can't access the repository at all. It's also not a case sentivity error (because there are no upper case).

I've tried reinstalling it, using svn CLI that comes with tortoise, cleaning identification data. Anyone has any idea what could I do ? (except changing SVN client or using eclispe's svn to checkout everything)


Solution

  • For short:

    I had to go pretty deep to found a solution, but basically, some of my clients weren't compatible with my server, and the server told them "403 forbidden acces" (but no client would tell me exactly that because it was an html page...).

    I now use an older version of SVNKit: My server is in 1.8.8, and my working clients were less than 1.9, while my none-working client were more or equal 1.9. So I had to use an older TortoiseSVN. This is surely a choice made by the server's admin.

    I also clean all credentials (even if I did multiple times without any effect...)

    The long answer:

    The problem also happend on another eclipse (I have to use different eclipse for different projects), which also had a more recent svn client (subversive, SVNKit in 1.9) and had the same problem (i.e "Access forbidden"). Using any brower or my other eclipse's subversion (SVNKit 1.8.4) didn't make this problem.

    I used wireshark to see why were some request denied while other weren't. User agent were different (only due to version). From what I've seen using eclipse'SVN

    1. SVN client tries to connect to the server using http/xml request (there are also ACK and others, but that's not important). The first request in both case doesn't have any authorization/credential (in the http part of the request).
    2. To which the server responds that there are no credentials or that they are missing. It's actually a custom html answer in the data part of the frame, but it's a HTTP/1.1 401 Unauthorized.
    3. Now the client sends the same HTTP request but with credentials.
    4. Server answers HTTP/1.1 200 OK.
    5. Exchange goes on normally.

    If I use a more recent SVN version, the first client request doesn't seem to be different (apart from user agent), but the answer from the serveur is HTTP/1.1 403 Forbidden.

    (I just took a look at the data part when it doesn't work, and it's a html page stating that my client might not be compatible ... well, can't see that from tortoise. So, "forbidden" wasn't because of a wrong username/password or a user privilege problem, but a version problem...)

    I'm posting the long answer in case you have a similar problem: try to use Wireshark to read the data part of the HTTP answer from the server, because your SVN client might not (even the CLI did not).

    Oh and: how to clean eclipse's SVN credentials https://stackoverflow.com/a/21693402