Ben Collins-Sussman wrote:
>
> On Mar 7, 2005, at 8:13 AM, C. Schanck wrote:
>
>>
>>
>> From: Ben Collins-Sussman <sussman@collab.net>
>> Date: March 7, 2005 7:59:37 AM CST
>> To: "C. Schanck" <chris@schanck.net>
>> Subject: Re: Programmatically verify user is logged in?
>>
>>
>> (can you resend to the users@ list to keep this public?)
>>
>>
>> On Mar 6, 2005, at 10:06 PM, C. Schanck wrote:
>>
>>> Ben Collins-Sussman wrote:
>>>
>>>>
>>>> On Mar 3, 2005, at 10:16 PM, Chris Schanck wrote:
>>>>
>>>>> We use svn inside another set of scripts -- python to be exact.
>>>>> One of the problems we run into is that the script cannot easily
>>>>> tell or enforce that the user has write access to the repository
>>>>> before an svn command is executed.
>>>>>
>>>>> Is there an (easy|portable|fast) way to check if the user has
>>>>> authenticated?
>>>>>
>>>>
>>>> Subversion isn't like CVS; the client doesn't "log in". Instead,
>>>> the server either sends a challenge, or it doesn't. The client
>>>> only authenticates when the server prompts.
>>>>
>>>> I have to admit that I don't understand. What does it mean for a
>>>> script to "enforce that a user has write access to a repository"?
>>>> Access control is something controlled by the server, and the
>>>> policies are created server-side. No script can force the client
>>>> to "log in"... the client just responds when the server prompts.
>>>>
>>>>
>>>>
>>> Hey Ben,
>>>
>>> I understand how subversion works. But it is annoying for us.
>>>
>>> Our developers don't bother to know they are using subversion much.
>>> They barely noticed we moved from CVS to subversion (except for the
>>> speed increase ;-). They just use our scripts.
>>>
>>> The script we use captures input and parses output and status.
>>> Consequently when a user needs to login, the script just hangs and
>>> the user has no idea why. Of course, I know it is waiting on input.
>>> But that doesn't help much.
>>>
>>> CVS was much easier to use in "batch" mode. With subversion, there
>>> is no way to tell if the user has logged in, and if it will fail.
>>> Annoying. I'd rather svn just failed if it needed to authenticate.
>>
>
>
> Have you learned about the --non-interactive switch? That will
> prevent any prompting and just cause failure.
>
> Also, what you probably want is to use --username and --password on
> the commandline. This "arms" a set of authentication credentials, so
> that if the server decides to challenge the client, they'll be used
> automatically.
>
> All of these options are useful for scripting, and I suspect will
> solve your problems.
>
Well, -username would be good but password would be problematic to track.
But --non-interactive is perfect!
Thanks a lot,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Mar 7 21:45:54 2005