I am trying to use the SharpSvn library on our build server. On the development machine it works fine but when I put on the build server I get the following error:
SASL(-1): generic failure: Unable to find a callback: 2
The code I am using is as follows:
public IList<Branch> GetBranches()
{
using (var client = new SvnClient())
{
Collection<SvnListEventArgs> outBranches;
client.Authentication.Clear();
client.Authentication.UserNamePasswordHandlers += Authentication_UserNamePasswordHandlers;
client.GetList(SvnTarget.FromString(_settings.SvnBranchUrl), out outBranches);
return outBranches.Select(x => new Branch {Name = x.Path}).ToList();
}
}
private void Authentication_UserNamePasswordHandlers(object sender, SharpSvn.Security.SvnUserNamePasswordEventArgs e)
{
e.UserName = _settings.SvnUsername;
e.Password = _settings.SvnPassword;
}
TIA
Andrew