3
            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 让我对这些东西感到头疼。

4

1 回答 1

4

尝试这个

client.Authentication.ForceCredentials("login", "pswd");
于 2014-04-09T16:41:41.160 回答