[Tutor] Help with pysvn
Martin Walsh
mwalsh at groktech.org
Tue Apr 17 04:23:55 CEST 2007
Hi Nam,
Pavar, Namratha wrote:
> Hi,
>
>
>
> I am getting the error "pysvn._pysvn.ClientError: callback_get_login
> required" when I try to do a simple exercise using pysvn. I have made
> sure the subversion config file doesn't have the "store-auth-creds = no"
> .
>
> I would appreciate any help.
>
> Following is the code and error message.
>
>>>> import pysvn
>
>>>> client = pysvn.Client()
>
> client.checkout('http://arcsource.nam.coair.com/arc/svn/devref/trunk/mak
> o/',
>
> 'D:\cpy')
>
> Traceback (most recent call last):
>
> File "<stdin>", line 1, in ?
>
> pysvn._pysvn.ClientError: callback_get_login required
>
>
In this case, the truth is in the traceback.
Here is the relevant part of the pysvn documentation:
http://pysvn.tigris.org/docs/pysvn_prog_ref.html#pysvn_client_callback_get_login
pysvn.Client seems to require that you declare a callback function to
provide login credentials when needed to access a repository/project, if
not previously cached (or if caching is disabled). A simple example
providing a callback function might look like this:
def login(*args):
return True, 'myuser', 'mypass', False
import pysvn
client = pysvn.Client()
client.callback_get_login = login
client.checkout('http://subversion.example.com/someproject/trunk')
But, the above might not be acceptable -- depending on security
concerns, as your repository password is presented in plain text.
HTH,
Marty
> Thanks,
>
>
>
> Nam
>
More information about the Tutor
mailing list