Я дублируется:LibGit2Sharp и TFS Git репозиторий
https://github.com/libgit2/libgit2sharp
, который, как я понимаю, клиент мерзавец используется в TFS 2015. Я пытаюсь запустить тест:
public void CanCloneFromBBWithCredentials(string url, string user, string pass, bool secure)
В :
https://github.com/libgit2/libgit2sharp/blob/vNext/LibGit2Sharp.Tests/CloneFixture.cs
Где я га ве обновлял его использовать репозиторий я имею в TFS:
[Theory]
//[InlineData("https://[email protected]/libgit2/testgitrepository.git", "libgit3", "libgit3", true)]
[InlineData("http://tfs/tfs/collection/project/_git/MyRepo", "myUser", "myPass", false)]
// [InlineData("http://tfs/tfs/collection/project/_git/MyRepo", "myUser", "myPass", true)]
public void CanCloneFromBBWithCredentials(string url, string user, string pass, bool secure)
{
var scd = BuildSelfCleaningDirectory();
string clonedRepoPath = Repository.Clone(url, scd.DirectoryPath, new CloneOptions()
{
CredentialsProvider = (_url, _user, _cred) => CreateUsernamePasswordCredentials (user, pass, secure)
});
using (var repo = new Repository(clonedRepoPath))
Но когда я запускаю тест я получаю следующее исключение:
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in c:\tmp\Repos\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 160
at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in c:\tmp\Repos\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 178
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in c:\tmp\Repos\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 328
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in c:\tmp\Repos\libgit2sharp\LibGit2Sharp\Repository.cs:line 694
at LibGit2Sharp.Tests.CloneFixture.CanCloneFromBBWithCredentials(String url, String user, String pass, Boolean secure) in c:\tmp\Repos\libgit2sharp\LibGit2Sharp.Tests\CloneFixture.cs:line 227
Я проверил, что я могу использовать имя пользователя и пароль приведенный выше, чтобы клонировать хранилище из командной строки, используя: https://git-scm.com/
Любые идеи о том, как запускать тесты libgit2sharp в хранилище GFS TFS 2015?