You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by John Owens <jo...@yahoo.com> on 2009/04/16 16:45:15 UTC

svn externals: 2 paths for authentication, but only one external?

In my repository, I have a path /foo and a path /bar.
My users only fetch /foo, but I would like foo to contain bar
when they get /foo (presumably into /foo/bar). I use svn
externals to do this. It works great.

I also have two authentication paths into my repository.
One uses our campus's Kerberos authentication (let's call
this /repository_kerberos). The second uses a password file
(/repository_password).

My problem is that I need to add the external as either
/repository_kerberos or /repository_password. Either choice
locks out the other from updating the external. 

Is there any way around this? (What I really want is a
softlink, because the person who uses the "wrong" repository
still has full rights to get /bar, it's just /bar is listed
under the other authentication path and so he can't get it.)

JDO

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1750689

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svn externals: 2 paths for authentication, but only one external?

Posted by Bob Archer <bo...@amsi.com>.
> John Owens wrote:
> > The problem is that when I add bib as an external, I have to add it
> under
> > one of the two authentication paths, either Kerberos or password. If
> > I pick one, the external doesn't work for the other one. That's the
> > problem I'm trying to solve.

I don't work a lot with Apache. But, can't you just set up a second
location to the same repository using Digest Authentication rather than
Kerberos for these external people?

This way you won't need externals right?

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1774024

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


RE: svn externals: 2 paths for authentication, but only one external?

Posted by Bob Archer <bo...@amsi.com>.
> Well, it sounds like the ideal answer is a relative external:
> "^/bib/all.bib". Unfortunately, I think you can't use relative paths
for
> file externals in 1.6; only folder externals will work. (I may be
wrong
> about this; I only vaguely remember seeing it mentioned at some
point.)


Even if you can use relative file externals, the file that the external
points to must also be checked out on the workstation. So, if the user
doesn't have access to it, neither will a file external.

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1774766

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


RE: svn externals: 2 paths for authentication, but only one external?

Posted by Bob Archer <bo...@amsi.com>.
> > http://svnbook.red-bean.com/en/1.0/ch07s03.html
> 
> That's the book for svn 1.0. :) Try this instead:
> http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html
> 
> There isn't a 1.6 version of the book yet, at least as far as I know.

Sure there is:

http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.advanced.extern
als

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1775602

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: svn externals: 2 paths for authentication, but only one external?

Posted by Mike Dixon <mi...@denovosoftware.com>.
John Owens wrote:
> I like the suggestion of ^. Is this in the docs anywhere?
> 'Cause I don't see it here:
> 
> http://svnbook.red-bean.com/en/1.0/ch07s03.html

That's the book for svn 1.0. :) Try this instead:
http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html

There isn't a 1.6 version of the book yet, at least as far as I know.

> Right now it's /papers/paper/bib/all.bib, so "bib" is a subdirectory
> already. 
> 
> Appended is the file structure.It sounds like if I change the external
> to "^/bib bib" that will work?

If you set the externals on /papers/paper to "^/bib bib", it won't work 
because /papers/paper/bib already exists. (You may be able to set and 
commit the property, but updates will fail.) It's fine to set the 
externals on /papers/paper/bib, because /papers/paper/bib/bib doesn't exist.

I'm assuming your trunk looks like this:

/bib
/bib/all.bib
/papers
/papers/paper
/papers/paper/bib
/papers/paper/bib/vision.bib

There's no way to get vision.bib and all.bib in the same directory using 
folder externals; that's what file externals are for. And I may well be 
wrong about ^ not working with file externals. After looking at the 
release notes for 1.6, I think I was mis-remembering this comment:

"The file external's URL must be in the same repository as the URL that 
the file external will be inserted into; inter-repository file externals 
are not supported."

So I'd suggest trying it and seeing what happens. :)

If you do go with folder externals, you can either set the externals on 
/papers/paper to "^/bib bib_shared", and a WC of /papers/paper will look 
like this:

bib
bib/vision.bib
bib_shared
bib_shared/all.bib

Or you can set it on /papers/paper/bib and get this:

bib
bib/vision.bib
bib/bib_shared
bib/bib_shared/all.bib

-Mike

> 
> (I am new at this.)
> 
> (Thanks!)
> 
> JDO
> 
> classico 9963$ pwd
> /Users/jowens/Documents/working/owens/trunk
> classico 9862$ ls bib
> README          gpgpu.bib       owens.bib       speech.bib      vision.bib
> algorithms.bib  imagine.bib     parallel.bib    sw.bib
> all.bib         make.sh         sort.bib        untabify.el
> classico 9862$ ls papers/hashgpu09/ | grep '^bib'
> bib
> classico 9863$ ls papers/hashgpu09/bib
> README          gpgpu.bib       owens.bib       speech.bib      vision.bib
> algorithms.bib  imagine.bib     parallel.bib    sw.bib
> all.bib         make.sh         sort.bib        untabify.el

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1775532

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by Mike Dixon <mi...@denovosoftware.com>.
John Owens wrote:
> The problem is that when I add bib as an external, I have to add it under
> one of the two authentication paths, either Kerberos or password. If
> I pick one, the external doesn't work for the other one. That's the 
> problem I'm trying to solve.

Well, it sounds like the ideal answer is a relative external: 
"^/bib/all.bib". Unfortunately, I think you can't use relative paths for 
file externals in 1.6; only folder externals will work. (I may be wrong 
about this; I only vaguely remember seeing it mentioned at some point.)

Would it be okay to have all.bib appear in a subdirectory for each 
paper? ex. /papers/paper/shared/all.bib

If that will work, then just add "^/bib shared" to your svn:externals to 
each /papers/paper folder. Or if you have more than one file in /bib, 
move all.bib into a subdirectory and then use that as the external 
target. ex. "^/bib/shared shared"

-Mike

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1773923

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, John Owens!

>> Actually, both.
>> I can't imagine any sane way to change links depends on the auth scheme(!)
>> used, and I can't imagine situation, in which it could be need.
>> Also, please explain, how would you resolve conflicts when users commit their
>> changes?

> OK, let me explain the actual situation in more detail. I am happy
> to hear about a different way to solve it!

> I am on a campus that has Kerberos authentication for people on the
> campus. This is preferred. I have an svn path so my colleagues on
> campus can use svn using Kerberos authentication. It's also better to
> do this since I don't have to set up password authentication.

> However, some of my colleagues are NOT on campus. For them I have a
> different authentication path. It uses hashed passwords. It's not as
> secure or good as Kerberos, so I avoid using it if possible. But it
> is the only way off-campus people can use our repository.

Can't understand, what deny you from using same path with both auth...
Apache allow that, if I'm reading it right.


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 18.04.2009, <0:48>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1774777

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by John Owens <jo...@yahoo.com>.
John Owens <john_owens <at> yahoo.com> writes:

> What I really want is to have all.bib included in each paper
> (/papers/paper/all.bib). A softlink would work great, but svn doesn't
> support softlinks. But externals is fine - I can add bib in each paper
> directory as an external and it fetches nicely. Then my users only 
> have to fetch the one paper directory and nothing else, which is
> preferred.
> 
> The problem is that when I add bib as an external, I have to add it under
> one of the two authentication paths, either Kerberos or password. If
> I pick one, the external doesn't work for the other one. That's the 
> problem I'm trying to solve.

It appears that the new 1.5 relative URLs are solving this problem! 
Thanks to Bob and Mike for pointing me in the right direction.

http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html

My svn externals syntax is now:

$ svn propget svn:externals .
^/trunk/bib bib    

This fetches the directory at my svn root called "trunk/bib" into
a "bib" directory. Now it doesn't hardcode the authentication
method into the path, so both authentication methods (even though
they come from different https:// paths) can get it. I am crossing
my fingers this works for my external users, but looks good so far!

Thanks guys.

JDO

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1775820

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by John Owens <jo...@yahoo.com>.
Andrey Repin <anrdaemon <at> freemail.ru> writes:

> Actually, both.
> I can't imagine any sane way to change links depends on the auth scheme(!)
> used, and I can't imagine situation, in which it could be need.
> Also, please explain, how would you resolve conflicts when users commit their
> changes?

OK, let me explain the actual situation in more detail. I am happy
to hear about a different way to solve it!

I am on a campus that has Kerberos authentication for people on the
campus. This is preferred. I have an svn path so my colleagues on
campus can use svn using Kerberos authentication. It's also better to
do this since I don't have to set up password authentication.

However, some of my colleagues are NOT on campus. For them I have a
different authentication path. It uses hashed passwords. It's not as
secure or good as Kerberos, so I avoid using it if possible. But it
is the only way off-campus people can use our repository.

Now, we write papers together, and those papers are stored in svn. So
we have a /papers directory in the repository. We also have a bibliography
file that is shared among all papers in /bib/all.bib. 

What I really want is to have all.bib included in each paper
(/papers/paper/all.bib). A softlink would work great, but svn doesn't
support softlinks. But externals is fine - I can add bib in each paper
directory as an external and it fetches nicely. Then my users only 
have to fetch the one paper directory and nothing else, which is
preferred.

The problem is that when I add bib as an external, I have to add it under
one of the two authentication paths, either Kerberos or password. If
I pick one, the external doesn't work for the other one. That's the 
problem I'm trying to solve.

Happy to hear suggestions and/or ideas for how I could structure this
in a different way to accomplish my goal of two authentication schemes
where users in either scheme can do one "svn co" to get both the paper
and the bib.

JDO

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1773566

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, John Owens!

>> Sorry, I can't imagine any real-world example of such scheme.
>> May be you should think about it some more? Probably, run some redundancy
>> checks on your idea?

> Are you asking "what is a real-world scenario that faces this
> particular problem?" (in which case I'll explain mine) or instead
> "I can't think of a way to solve this problem"?

Actually, both.
I can't imagine any sane way to change links depends on the auth scheme(!)
used, and I can't imagine situation, in which it could be need.
Also, please explain, how would you resolve conflicts when users commit their
changes?


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 17.04.2009, <22:28>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1772609

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by John Owens <jo...@yahoo.com>.
Andrey Repin <anrdaemon <at> freemail.ru> writes:

> Sorry, I can't imagine any real-world example of such scheme.
> May be you should think about it some more? Probably, run some redundancy
> checks on your idea?

Are you asking "what is a real-world scenario that faces this
particular problem?" (in which case I'll explain mine) or instead
"I can't think of a way to solve this problem"?

JDO

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1759443

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn externals: 2 paths for authentication, but only one external?

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, John Owens!

> In my repository, I have a path /foo and a path /bar.
> My users only fetch /foo, but I would like foo to contain bar
> when they get /foo (presumably into /foo/bar). I use svn
> externals to do this. It works great.

> I also have two authentication paths into my repository.
> One uses our campus's Kerberos authentication (let's call
> this /repository_kerberos). The second uses a password file
> (/repository_password).

> My problem is that I need to add the external as either
> /repository_kerberos or /repository_password. Either choice
> locks out the other from updating the external. 

> Is there any way around this? (What I really want is a
> softlink, because the person who uses the "wrong" repository
> still has full rights to get /bar, it's just /bar is listed
> under the other authentication path and so he can't get it.)

Sorry, I can't imagine any real-world example of such scheme.
May be you should think about it some more? Probably, run some redundancy
checks on your idea?


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 17.04.2009, <5:44>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1758746

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].