为TFS-GIT存储库运行时,TFS构建失败 [英] TFS Build Fail when running for TFS-GIT Repository

查看:128
本文介绍了为TFS-GIT存储库运行时,TFS构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2015& TFS2013.

I am using VS2015 & TFS2013.

我在TFS上有一个GIT存储库,该存储库上有一个Web应用程序,我正尝试使用TFS构建版发布它.

I have a GIT repository on TFS which has got a web application and I am trying to publish that using TFS build.

我创建了一个用于部署失败的Web应用程序的构建.

I created a build for deploying that web application which fails.

这是完整的错误消息:

Cloning repository 'http://localhost:8080/tfs/defaultcollection/GitTest/_git/GitTest' into 'C:\Builds\2014\GitTest\TestGitBuild\src'.
**Exception Message: Response status code does not indicate success: 404 (Not Found).** (type LibGit2SharpException) Exception Data Dictionary: libgit2.code = -1 libgit2.category = 12 Exception Stack Trace: Server stack trace: at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) at Microsoft.TeamFoundation.Build.Activities.Git.GitPull.GitClone.GetRepository(String repositoryUrl, String workingFolder, Boolean checkoutSubmodules) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) at System.Func`4.EndInvoke(IAsyncResult result) at Microsoft.TeamFoundation.Build.Activities.Git.GitPull.GitRepositoryBase.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) 

有什么想法吗?

推荐答案

添加项目集合构建服务帐户"并赋予读取"权限为我解决了这个问题.

Adding "Project Collection Build Services Accounts" and giving Read permissions solved the problem for me.

您可以通过右键单击项目,然后在Web门户中选择安全性"来转到此弹出窗口.

You can go to this popup by right clicking on your project and then select Security in your Web portal.

这篇关于为TFS-GIT存储库运行时,TFS构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆