views:

21

answers:

1

I am trying to run a SVN command in a script, but the script is launched as a system service that has cached svn username/password credentials.

I could always just put the username/password arguments in the command:

svn info --username bob --password pass

but I'd rather not have my username/password just sitting in a text file.

I've discovered that my cached credentails (when run svn normally) end up here:

C:\Documents and Settings\bob\Application Data\Subversion\auth\svn.simple\6ef188c2163f1ccc860a690b7ad21a15

Is there any way I could copy this cached credential file to where my script exists and just call that file explicitly?

A: 

Hmm. According to the manual, simply copying across the cached files won't work:

On Windows 2000 and later, the Subversion client uses standard Windows cryptography services to encrypt the password on disk. Because the encryption key is managed by Windows and is tied to the user's own login credentials, only the user can decrypt the cached password.

Have you tried setting user name and password when running the script once? Don't the credentials get cached for the system user as well?

If that doesn't happen, the only way I can see is to tun the script as somebody else - but you've probably already considered that.

Pekka