0
我在嘗試使用庫libgit2sharp克隆存儲庫時遇到了一些問題。無法設置代理:錯誤的參數libgit2sharp
我得到這個錯誤:
A first chance exception of type 'LibGit2Sharp.LibGit2SharpException' occurred in LibGit2Sharp.dll
Additional information: Failed to set proxy: Wrong parameter.
我試圖克隆這樣的:
var gitServerUri = new Uri(Settings.Default.GitServerUrl);
var cred = Git.Credentials.Get(gitServerUri.Host);
string clonedRepoPath = Repository.Clone(project.GitUrl(),projectLocalPath, new CloneOptions()
{
CredentialsProvider = (_url, _user, _cred) => new UsernamePasswordCredentials
{
Username = cred.Login,
Password = cred.Password,
}
});
我試着在libgit2sharp的維基找到在那裏我應該把代理配置,但我沒有找到。
如果有人能幫忙,我將不勝感激。