client.Authentication.DefaultCredentials = new NetworkCredential("login",
"pswd",
new Uri("address").AbsoluteUri);
client.Authentication.SslServerTrustHandlers += delegate(object sender, SvnSslServerTrustEventArgs e)
{
e.AcceptedFailures = e.Failures;
e.Save = true; // Save acceptance to authentication store
};
我尝试连接到只读仓库,它给了我一个例外:
'Unable to connect to a repository at URL'|'Access Forbidden'
URL和登录\密码当然是正确的。
试图从VisualSVN和TotroiseSVN连接,没关系,没问题。
但是SharpSVN让我很头疼。
答案 0 :(得分:3)
试试这个
client.Authentication.ForceCredentials("login", "pswd");