TFS Build Fail when running for TFS-GIT Repository

一世执手 提交于 2020-01-04 02:27:08

问题


I am using VS2015 & TFS2013.

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

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

Here is the full error message:

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) 

Any idea whats going wrong?


回答1:


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

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



来源:https://stackoverflow.com/questions/40112023/tfs-build-fail-when-running-for-tfs-git-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!