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

Force Subversion to grab information from Mac OS X keychain

From: Kevin Lindeman <lindeman_at_uw.edu>
Date: Fri, 7 Jan 2011 12:43:01 -0800


I am running Subversion on Mac OS X. I noticed that once I login correctly
for an https subversion URL, it will create a file in ~/.subversion/auth/
that seems to point Subversion to where it stores the authentication - in
this case, it has the realmstring, username, "passtype", which is set to
keychain. That makes it know that it should be using the keychain from then
on to remember the password.

I am trying to automate some subversion processes, so I launch subversion,
give it arguments arguments, and even set some environment variables (such
as SVN_SSH, which allows me to tell SVN how to launch ssh, ie: with a
special username).

Unfortunately, my automation has no way to intercept the password prompt for
an http url. I can intercept the SSH login prompt for svn+ssh by setting the
SSH_ASKPASS environment variable. I already have been automating the process
of adding the password to the keychain (using the realmstring format, so svn
can find it once it knows to find it in the keychain).

But it looks like I am missing that critical file in ~/.subversion/auth/
that has the "passtype" set to keychain. Is there a way I can force SVN to
always use that as the passtype, either with an argument or an environment

If not, is it possible to force the creation of that file with some magic
SVN command? I thought of just running an svn info with my login info as
arguments since I noticed that file is created on a successful login, but
unfortunately many servers don't request authorization for info requests so
that doesn't work.

I don't think I will be able to solve this by using a setting in the
subversion config file.

- Kevin
Received on 2011-01-07 21:43:43 CET

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