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, IList
1 branchFilters) at Microsoft.TeamFoundation.Build2.Server.Extensions.GitSourceProvider.GetSourceVersionsToBuild(IVssRequestContext requestContext, BuildDefinition definition, List
1 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
This was resolved by adding the Project Collection Service Accounts as a member of the endpoint administrators
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With