0

I have a Subversion tree that only has some directories public. The last directory is only available for user "me".

/trunk/public1
/trunk/public2
/trunk/private1

When I do a checkout of trunk, I get /public1 and /public2, but not /private1. I'm not asked for my credentials, because Subversion sees it can automatically check out the public directories.

  1. How do I force Subversion to check out this directory as "me" so I can get all the directories? I had assumed this would be as easy as adding --username on the command line---but that doesn't work!
  2. But what if I've already checked out this directory structure and only have the public directories? I've already switched to use "me" because I can do commits with no problem. But whatever I do, the /private1 directory does not show up. How can I update my local copy with the private directory?

What makes this even stranger is that I can do (inside the directory):

svn update private1

and Subversion apparently succeeds with no errors or warnings---but I still don't get the directory. (of course I can also update private2, which doesn't exist, and still get no errors or warnings, so I guess this doesn't mean anything.)

Here is the relevant parts of my Subversion authorization file on Apache:

[groups]
developers=me

[foo:/trunk]
@developers=rw
*=r

[foo:/trunk/private1]
@developers=rw
*=

I can browser to /trunk/private1 just fine using my browser over WebDAV (after I enter the correct credentials for user "me").

Zoe
  • 27,060
  • 21
  • 118
  • 148
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272

1 Answers1

0

See the section on path-based authorization in the Subversion manual. In particular, read the last grey box on the page.

Based on this information, it looks like the server sees that it can check out the root folder without credentials and is then doing the entire checkout anonymously. Since you only have one chance to authenticate, you're still anonymous when you get to the private directories so you don't get a copy of them. If you need to get access-protected directories like this, use the --username option on the initial svn checkout command. I don't know that you can checkout a folder using one set of credentials into the middle of a working copy that was checked out using a different set of credentials (doing so would make svn commit confusing, because each commit can only have one author).

Browsing the source using a web browser is a different animal entirely, as the server can ask for authentication every time a new page loads.

bta
  • 43,959
  • 6
  • 69
  • 99