我正在使用Mono3.6.0在我的Ubuntu 14机器上构建libgit2sharp的0.19版本。然而,当我调用./build.libgit2sharp.sh时,我会收到很多消息,如下所示。
/home/chris/projects/libgit2sharp/CI-build.msbuild: error:
LibGit2Sharp.Tests.CloneFixture.CanCloneBarely(url: "http://github.com/libgit2/TestGitRepository"): LibGit2Sharp.LibGit2SharpException : An error was raised by libgit2. Category = Net (Error).
Only relative redirects are supported错误消息总是相同的“只支持相对重定向”。
我一直在问题跟踪器上读到,用libgit2sharp构建的Mono版本可以是一个问题,3.6.0可以吗?
原来我错了,上面的错误来自于我试图构建v0.14 (我忘了切换分支)。我在v0.19上的错误是:
/home/chris/projects/libgit2sharp/CI/build.msbuild: error : LibGit2Sharp.Tests.BlameFixture.CanBlameFromADifferentCommit: Assert.Throws() Failure Expected: LibGit2Sharp.LibGit2SharpException Actual: System.EntryPointNotFoundException: git_blame_file 我会犯更多这样的错误。完整日志是这里。
发布于 2014-09-08 05:45:14
mono的版本不是问题。无论如何,网络代码都不是在C#中实现的。
由于各种原因,libgit2 HTTP层目前只支持相对重定向。当您使用http作为方案时,GitHub首先需要告诉您使用HTTPS,这必须是一个绝对的重定向。
如果您使用HTTPS连接到GitHub,它将正确工作(无论如何,您都应该使用它)。
https://stackoverflow.com/questions/25715321
复制相似问题