SharpSVN:无法连接到URL的存储库访问被禁止

时间:2013-11-11 19:00:20

标签: c# svn login sharpsvn

            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让我很头疼。

1 个答案:

答案 0 :(得分:3)

试试这个

client.Authentication.ForceCredentials("login", "pswd");