You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Fabian Cenedese <Ce...@indel.ch> on 2005/09/15 09:36:22 UTC

Test login

Hi

Is there a command to check if the user credentials are already known
or would be asked if e.g. a commit was performed? I have a script which
does perform various tasks and also a commit and I don't want it to
stop in the middle because it needs user password or even worse will
fail because of a wrong password.

CVS has the login command to do this step by itself so further commands
wouldn't need a password again. I already have the 

[auth]
store-auth-creds = yes

but that still needs to be filled first. So I'd like to do the login step
without actually doing a command on the repository.

Thanks

bye   Fabi



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Test login

Posted by Fabian Cenedese <Ce...@indel.ch>.
>> Is there a command to check if the user credentials are already known
>> or would be asked if e.g. a commit was performed? I have a script which
>> does perform various tasks and also a commit and I don't want it to
>> stop in the middle because it needs user password or even worse will
>> fail because of a wrong password.
>>
>> CVS has the login command to do this step by itself so further commands
>> wouldn't need a password again. I already have the
>>
>> [auth]
>> store-auth-creds = yes
>>
>> but that still needs to be filled first. So I'd like to do the login step
>> without actually doing a command on the repository.
>
>I don't know of a way to test for write permission without actually changing
>something since commit doesn't take a dry run option (AFAICT).
>
>How about this idea - have a dummy repository or part of a repository that
>requires authentication and authorisation to be able to read from it, assign
>the same user you want to test permission for to this special area and do a
>svn ls on the area at the start of your script?

In this case the script will still ask for a password so it's not really better.
But I just found the --non-interactive flag that will just fail if the user is not
known. So I could make the script fail before it does anything else. Now
I just need another way to ignite authentication. I don't like the dummy
repository idea that much. Maybe the locked down read access is a
better way. Need to think it over.

Thanks for ideas.

bye   Fabi



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Test login

Posted by Ximon Eighteen <xi...@int.greenpeace.org>.
Fabian Cenedese wrote:
> Hi
>
> Is there a command to check if the user credentials are already known
> or would be asked if e.g. a commit was performed? I have a script which
> does perform various tasks and also a commit and I don't want it to
> stop in the middle because it needs user password or even worse will
> fail because of a wrong password.
>
> CVS has the login command to do this step by itself so further commands
> wouldn't need a password again. I already have the
>
> [auth]
> store-auth-creds = yes
>
> but that still needs to be filled first. So I'd like to do the login step
> without actually doing a command on the repository.

I don't know of a way to test for write permission without actually changing
something since commit doesn't take a dry run option (AFAICT).

How about this idea - have a dummy repository or part of a repository that
requires authentication and authorisation to be able to read from it, assign
the same user you want to test permission for to this special area and do a
svn ls on the area at the start of your script?

-- 

-----------------------------------------------------------------------
Ximon Eighteen [desk: +31 (0)20 718 2134 reception: +31 (0)20 718 2000]
IT, Greenpeace International                    System Support Engineer
Ottho Heldringstraat 5, 1066 AZ Amsterdam       & Application Developer
-----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Test login

Posted by Ben Collins-Sussman <su...@collab.net>.
On Sep 15, 2005, at 4:36 AM, Fabian Cenedese wrote:
>  So I'd like to do the login step
> without actually doing a command on the repository.


Not possible.  In CVS, the client "pushes" credentials by logging  
in.  In Subversion, the server "pulls" credentials from the client  
whenever it decides authentication is necessary.  There's no way for  
the client to predict if/when this will happen.  The client can only  
react to a server-pull, it cannot 'push'.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Test login

Posted by Steve Williams <st...@kromestudios.com>.
Fabian Cenedese wrote:
> Hi
> 
> Is there a command to check if the user credentials are already known
> or would be asked if e.g. a commit was performed? I have a script which
> does perform various tasks and also a commit and I don't want it to
> stop in the middle because it needs user password or even worse will
> fail because of a wrong password.
> 
> CVS has the login command to do this step by itself so further commands
> wouldn't need a password again. I already have the 
> 
> [auth]
> store-auth-creds = yes
> 
> but that still needs to be filled first. So I'd like to do the login step
> without actually doing a command on the repository.

How about using the --username and --password options to always pass the 
username and password with each svn command in the script?

-- 
Sly


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.