Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS 2017 Build Automatically kicks off and keeps failing

I have a TFS 2017 server build, it is linked to a bit bucket\Git repo. The build is set to automatically kickoff when master changes. This works fine and also works fine if i manually kick off a build of master or a branch.

But i keep getting thse failed build that randomly kick off by Project Collection Service Accounts

They always fail with this error

An exception occurred while polling the repository. Error: Microsoft.TeamFoundation.Build2.Server.Extensions.ExternalConnectorException: this remote has never connected ---> LibGit2Sharp.LibGit2SharpException: this remote has never connected at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) at LibGit2Sharp.Core.Proxy.git_remote_ls(Repository repository, RemoteHandle remote) at LibGit2Sharp.Repository.ListRemoteReferences(String url, CredentialsHandler credentialsProvider) at Microsoft.TeamFoundation.Build2.Server.Extensions.GitConnector.GetBranches(ExternalConnection connection) --- End of inner exception stack trace --- at Microsoft.TeamFoundation.Build2.Server.Extensions.GitConnector.GetBranches(ExternalConnection connection) at Microsoft.TeamFoundation.Build2.Server.Extensions.GitSourceProvider.GetMatchingBranchRefs(IVssRequestContext requestContext, BuildDefinition definition, IList1 branchFilters) at Microsoft.TeamFoundation.Build2.Server.Extensions.GitSourceProvider.GetSourceVersionsToBuild(IVssRequestContext requestContext, BuildDefinition definition, List1 branchFilters, Boolean batchChanges, String previousVersionEvaluated, Dictionary`2& ciData, String& lastVersionEvaluated) at Microsoft.TeamFoundation.Build2.Server.Extensions.BuildPollingJobExtension.Run(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage).

These fails are always Individual Continuous Integration

But when i check into master which is the same user Project Collection Service Accounts it uses Batched Continuous Integration not sure if this makes a difference. This is happening on all my build definitions but only since i upgrade to TFS 2017, this did not happen on my previous version

like image 924
MicroMan Avatar asked Mar 24 '17 09:03

MicroMan


1 Answers

This was resolved by adding the Project Collection Service Accounts as a member of the endpoint administrators

like image 105
MicroMan Avatar answered Oct 18 '22 10:10

MicroMan