I found the answer!
For save credentials in the computer in use
using (SvnClient client = new SvnClient())
{
//Save localy new Authentication credentials
client.Authentication.UserNamePasswordHandlers
+= delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args)
{
args.UserName = "username";
args.Password = "password";
args.Save= true;
};
}
Frequently I found the solution to add credentials in cache, but this will not store credentials in computer. This credentials are valid only for SvnClient life. I report the answer for completeness
using (SvnClient client = new SvnClient())
{
// Clear a previous authentication
client.Authentication.Clear();
client.Authentication.DefaultCredentials = new System.Net.NetworkCredential("user", "password");
}
I found part of the answer here
- Setting commit author in SharpSvn .NET library throws SvnRepisitoryIOException exception
- SVN Repository Authentication using SharpSVN
And here:
http://sharpsvn.open.collab.net/ds/viewMessage.do?dsMessageId=140680&dsForumId=728
looking at method DialogUserNamePasswordHandler
http://sharpsvn.open.collab.net/svn/sharpsvn/trunk/src/SharpSvn.UI/SvnClientUIHandler.cs
For access use:
- username: guest
- password not needed