[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Possible to have a default username for CLI and Tortoise? (but always prompt for PW)

From: Dominic Anello <danello_at_danky.com>
Date: 2006-06-02 17:28:37 CEST

On 2006-06-01 10:23:59 -0400, Xn Nooby wrote:
----8<----
> Ideally, whenever someone used either Subversion or TortoiseSVN, the machine
> would default to the read-only username and prompt them for that username's
> password. If they were trying to do a commit, they would change the default
> name to their own and enter their own password. I was hoping the Subversion
> config file had an option to specify a default username, but I have not
> found that.

The svn command line client always caches the most recent authentication
information it has seen for a particular repository unless it has been
directed not to. Your best bet is to do a checkout using your read-only
user and checkin using the username and no-auth-cache switches.

This is what we do in our build environment:
1. svn ls --username read_only_user --password ro_password http://server/repos
   
   This puts read_only_user's credentials into the auth cache. You can
   now do all the checkouts and updates you want without the need to
   authenticate.

2. Then when you have to do a checkin for whatever reason you do:
   svn ci --username dev_user --no-auth-cache foo.c

   This prevents dev_user's credentials from overwriting
   read_only_user's.

Another alternative might be to make the files in
%APPDATA%\Subversion\auth\svn.simple read-only to prevent them being
updated with new auth credentials, but I've not tried that.

> Currently, TortoiseSVN seems to be an all-or-nothing thing. If it is set to
> not remember the password or auth, there is no default username at all. If
> it is set to remember, it no longer prompts the user.

I don't believe there is any comparable solution for Tortoise.

-Dominic

  • application/pgp-signature attachment: stored
Received on Fri Jun 2 17:30:53 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.