azure-pipelines-agent: TFS On-Premise - Git clone fails with "SSL certificate problem: unable to get local issuer certificate"

Agent version and platform

Version of your agent? ‘2.105.7’
Windows Server 2012R2 Standard

VSTS type and version

TFS On-Premise - TFS 2017 RC
TFS 2017 RC

What’s not working?

Cloning git repository fails with error message: SSL certificate problem: unable to get local issuer certificate

tfs_error


## **Agent and Worker's diag log** ```

[2016-11-17 09:30:08Z INFO Program] Version: 2.105.7 [2016-11-17 09:30:08Z INFO Program] Commit: 5f286b1f01c51b7cace8c1649edd6b00893a3649 [2016-11-17 09:30:08Z INFO Program] Culture: de-DE [2016-11-17 09:30:08Z INFO Program] UI Culture: en-US [2016-11-17 09:30:09Z INFO ProxyConfiguration] No proxy setting found. [2016-11-17 09:30:09Z INFO Worker] Waiting to receive the job message from the channel. [2016-11-17 09:30:09Z INFO Worker] Message received. [2016-11-17 09:30:12Z INFO Worker] Job message: { “tasks”: [ { “instanceId”: “00a491f8-e62e-41cd-9f97-b3c5917513b8”, “displayName”: “GitVersion”, “enabled”: true, “continueOnError”: false, “alwaysRun”: false, “timeoutInMinutes”: 0, “id”: “e5983830-3f75-11e5-82ed-81492570a08e”, “name”: “GitVersion”, “version”: “3.4.1”, “inputs”: { “updateAssemblyInfo”: “true”, “updateAssemblyInfoFilename”: “”, “additionalArguments”: “”, “gitVersionPath”: “” } }, { “instanceId”: “73ae9c65-1014-477d-bfc9-f30d884c6d7d”, “displayName”: “NuGet restore \*.sln", “enabled”: true, “continueOnError”: false, “alwaysRun”: false, “timeoutInMinutes”: 0, “id”: “333b11bd-d341-40d9-afcf-b32d5ce6f23b”, “name”: “NuGetInstaller”, “version”: “0.2.21”, “inputs”: { “solution”: "\.sln", “nugetConfigPath”: “”, “restoreMode”: “restore”, “noCache”: “false”, “nuGetRestoreArgs”: “”, “verbosity”: “-”, “nuGetVersion”: “3.3.0”, “nuGetPath”: “” } }, { “instanceId”: “1e852129-bdcc-457e-9bbb-eee5ea63ddd7”, “displayName”: "Build solution **\.sln”, “enabled”: true, “continueOnError”: false, “alwaysRun”: false, “timeoutInMinutes”: 0, “id”: “71a9a2d3-a98a-4caa-96ab-affca411ecda”, “name”: “VSBuild”, “version”: “1.0.45”, “inputs”: { “solution”: “\*.sln", “msbuildArgs”: “”, “platform”: “$(BuildPlatform)”, “configuration”: “$(BuildConfiguration)”, “clean”: “true”, “vsVersion”: “14.0”, “maximumCpuCount”: “false”, “restoreNugetPackages”: “false”, “msbuildArchitecture”: “x86”, “logProjectEvents”: “true”, “createLogFile”: “false” } }, { “instanceId”: “6ad811c1-ea5c-4054-8c19-bf171343bd37”, “displayName”: "Test Assemblies \$(BuildConfiguration)\test.dll;-:\obj\”, “enabled”: true, “continueOnError”: true, “alwaysRun”: false, “timeoutInMinutes”: 0, “id”: “ef087383-ee5e-42c7-9a53-ab56c98420f9”, “name”: “VSTest”, “version”: “1.0.60”, “inputs”: { “testAssembly”: “\$(BuildConfiguration)\test.dll;-:\obj\**”, “testFiltercriteria”: “”, “runSettingsFile”: “”, “overrideTestrunParameters”: “”, “codeCoverageEnabled”: “true”, “runInParallel”: “false”, “vstestLocationMethod”: “version”, “vsTestVersion”: “14.0”, “vstestLocation”: “”, “pathtoCustomTestAdapters”: “”, “otherConsoleOptions”: “”, “testRunTitle”: “”, “platform”: “$(BuildPlatform)”, “configuration”: “$(BuildConfiguration)”, “publishRunAttachments”: “true” } } ], “requestId”: 113, “lockToken”: “00000000-0000-0000-0000-000000000000”, “lockedUntil”: “0001-01-01T00:00:00”, “messageType”: “JobRequest”, “plan”: { “scopeIdentifier”: “59da5dbe-d549-4cb7-b864-847438e435cc”, “planType”: “Build”, “version”: 6, “planId”: “2c76e875-d89a-4431-9c9b-d2cf7fbaa4b3”, “artifactUri”: “vstfs:///Build/Build/218”, “artifactLocation”: null }, “timeline”: { “id”: “bd3fd016-46ad-4d50-894a-6317bbb12aca”, “changeId”: 1, “location”: null }, “jobId”: “28163d23-50a8-4aea-88f2-69cbf1461fd4”, “jobName”: “Build”, “environment”: { “endpoints”: [ { “data”: { “repositoryId”: “073d2f5c-3405-48bd-8a44-ac9404c8ce11”, “rootFolder”: null, “clean”: “false”, “checkoutSubmodules”: “True”, “onpremtfsgit”: “True” }, “name”: “MyProject”, “type”: “TfsGit”, “url”: “https://tfs.contoso.com/tfs/Windows Services/_git/MyProject”, “authorization”: { “parameters”: { “AccessToken”: ******** }, “scheme”: “OAuth” }, “isReady”: false } ], “mask”: [ { “type”: “regex”, “value”: ******** }, { “type”: “regex”, “value”: ******** }, { “type”: “regex”, “value”: ******** }, { “type”: “regex”, “value”: ******** } ], “variables”: { “system”: “build”, “system.collectionId”: “5eda1acf-5026-4352-a3f4-24a7d7170d8e”, “system.teamProject”: “MyProject”, “system.teamProjectId”: “59da5dbe-d549-4cb7-b864-847438e435cc”, “system.definitionId”: “5”, “build.definitionName”: “vNext - [develop] (CD)”, “build.definitionVersion”: “7”, “build.queuedBy”: “Reichenbach, Michael”, “build.queuedById”: “a0508667-83b8-468e-80ee-2d4378309b6e”, “build.requestedFor”: “Reichenbach, Michael”, “build.requestedForId”: “a0508667-83b8-468e-80ee-2d4378309b6e”, “build.requestedForEmail”: “Michael.Reichenbach@interhyp.de”, “build.sourceVersion”: “f5f68e010386c418c96282b16098926e6b58880c”, “build.sourceBranch”: “refs/heads/develop”, “build.sourceBranchName”: “develop”, “system.debug”: “false”, “BuildConfiguration”: “release”, “BuildPlatform”: “any cpu”, “build.buildId”: “218”, “build.buildUri”: “vstfs:///Build/Build/218”, “build.buildNumber”: “$(GITVERSION_FullSemVer)”, “build.containerId”: “165”, “system.isScheduled”: “False”, “system.hosttype”: “build”, “system.culture”: “en-US”, “system.teamFoundationCollectionUri”: “https://tfs.contoso.com/tfs/Windows Services/”, “system.taskDefinitionsUri”: “https://tfs.contoso.com/tfs/Windows Services/”, “AZURE_HTTP_USER_AGENT”: “TFS_5eda1acf-5026-4352-a3f4-24a7d7170d8e_build_5_218”, “system.planId”: “2c76e875-d89a-4431-9c9b-d2cf7fbaa4b3”, “system.jobId”: “28163d23-50a8-4aea-88f2-69cbf1461fd4”, “system.timelineId”: “bd3fd016-46ad-4d50-894a-6317bbb12aca”, “build.repository.uri”: “https://tfs.contoso.com/tfs/Windows Services/_git/MyProject”, “build.sourceVersionAuthor”: “Reichenbach, Michael”, “build.sourceVersionMessage”: “fixed applocker again? 😕” }, “systemConnection”: { “data”: { “ServerId”: “5eda1acf-5026-4352-a3f4-24a7d7170d8e”, “ServerName”: “Windows Services” }, “name”: “SystemVssConnection”, “url”: “https://tfs.contoso.com/tfs/Windows Services/”, “authorization”: { “parameters”: { “AccessToken”: ******** }, “scheme”: “OAuth” }, “isReady”: false } } } [2016-11-17 09:30:12Z INFO JobRunner] Job ID 28163d23-50a8-4aea-88f2-69cbf1461fd4 [2016-11-17 09:30:12Z INFO ConfigurationStore] currentAssemblyLocation: C:\TFS_Build_Agents\BuildAgent\bin\Agent.Worker.dll [2016-11-17 09:30:12Z INFO ConfigurationStore] binPath: C:\TFS_Build_Agents\BuildAgent\bin [2016-11-17 09:30:12Z INFO ConfigurationStore] RootFolder: C:\TFS_Build_Agents\BuildAgent [2016-11-17 09:30:12Z INFO ConfigurationStore] ConfigFilePath: C:\TFS_Build_Agents\BuildAgent.agent [2016-11-17 09:30:12Z INFO ConfigurationStore] CredFilePath: C:\TFS_Build_Agents\BuildAgent.credentials [2016-11-17 09:30:12Z INFO ConfigurationStore] ServiceConfigFilePath: C:\TFS_Build_Agents\BuildAgent.service [2016-11-17 09:30:13Z INFO JobRunner] Ensure endpoint url match config url base. https://tfs.contoso.com/tfs/Windows Services/_git/MyProject [2016-11-17 09:30:13Z INFO JobRunner] Ensure System.TaskDefinitionsUrl match config url base. https://tfs.contoso.com/tfs/Windows Services/ [2016-11-17 09:30:13Z INFO JobRunner] Ensure System.TFCollectionUrl match config url base. https://tfs.contoso.com/tfs/Windows Services/ [2016-11-17 09:30:13Z INFO JobRunner] Ensure SystemConnection url match config url base. https://tfs.contoso.com/tfs/Windows Services/ [2016-11-17 09:30:13Z INFO JobRunner] Ensure System.TFServerUrl match config url base. https://tfs.contoso.com/tfs/Windows Services/ [2016-11-17 09:30:13Z INFO JobRunner] Creating job server with URL: https://tfs.contoso.com/tfs/Windows Services/ [2016-11-17 09:30:14Z INFO Worker] Listening for cancel message from the channel. [2016-11-17 09:30:14Z INFO Worker] Waiting for the job to complete or for a cancel message from the channel. [2016-11-17 09:30:15Z INFO JobServerQueue] Start process web console line queue. [2016-11-17 09:30:15Z INFO JobServerQueue] Start process file upload queue. [2016-11-17 09:30:15Z INFO JobServerQueue] Start process timeline update queue. [2016-11-17 09:30:15Z INFO JobRunner] Starting the job execution context. [2016-11-17 09:30:15Z INFO HostContext] Well known directory ‘Bin’: ‘C:\TFS_Build_Agents\BuildAgent\bin’ [2016-11-17 09:30:15Z INFO HostContext] Well known directory ‘Root’: ‘C:\TFS_Build_Agents\BuildAgent’ [2016-11-17 09:30:15Z INFO HostContext] Well known directory ‘Work’: ‘C:\TFS_Build_Agents\BuildAgent_work’ [2016-11-17 09:30:15Z INFO JobRunner] Validating directory permissions for: ‘C:\TFS_Build_Agents\BuildAgent_work’ [2016-11-17 09:30:15Z INFO JobRunner] Creating task server with https://tfs.contoso.com/tfs/Windows Services/ [2016-11-17 09:30:16Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:16Z INFO JobRunner] Getting job extensions. [2016-11-17 09:30:16Z INFO ExtensionManager] Getting extensions for interface: ‘Microsoft.VisualStudio.Services.Agent.Worker.IJobExtension’ [2016-11-17 09:30:16Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Build.BuildJobExtension, Agent.Worker [2016-11-17 09:30:16Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension, Agent.Worker [2016-11-17 09:30:16Z INFO JobRunner] Adding job prepare extensions. [2016-11-17 09:30:16Z INFO JobRunner] Adding tasks. [2016-11-17 09:30:16Z INFO JobRunner] Adding job finally extensions. [2016-11-17 09:30:16Z INFO JobRunner] Downloading task definitions. [2016-11-17 09:30:16Z INFO TaskManager] Ensuring task exists: ID ‘e5983830-3f75-11e5-82ed-81492570a08e’, version ‘3.4.1’, name ‘GitVersion’, directory ‘C:\TFS_Build_Agents\BuildAgent_work_tasks\GitVersion_e5983830-3f75-11e5-82ed-81492570a08e\3.4.1’. [2016-11-17 09:30:16Z INFO TaskManager] Task already downloaded. [2016-11-17 09:30:16Z INFO TaskManager] Ensuring task exists: ID ‘333b11bd-d341-40d9-afcf-b32d5ce6f23b’, version ‘0.2.21’, name ‘NuGetInstaller’, directory ‘C:\TFS_Build_Agents\BuildAgent_work_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.21’. [2016-11-17 09:30:16Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:21Z INFO TaskManager] Finished getting task. [2016-11-17 09:30:22Z INFO TaskManager] Ensuring task exists: ID ‘71a9a2d3-a98a-4caa-96ab-affca411ecda’, version ‘1.0.45’, name ‘VSBuild’, directory ‘C:\TFS_Build_Agents\BuildAgent_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.0.45’. [2016-11-17 09:30:22Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:22Z INFO TaskManager] Finished getting task. [2016-11-17 09:30:22Z INFO TaskManager] Ensuring task exists: ID ‘ef087383-ee5e-42c7-9a53-ab56c98420f9’, version ‘1.0.60’, name ‘VSTest’, directory ‘C:\TFS_Build_Agents\BuildAgent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\1.0.60’. [2016-11-17 09:30:22Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:36Z INFO TaskManager] Finished getting task. [2016-11-17 09:30:36Z INFO StepsRunner] Processing step: DisplayName=‘Get Sources’, AlwaysRun=False, ContinueOnError=False, Critical=True, Enabled=True, Finally=False [2016-11-17 09:30:36Z INFO StepsRunner] Starting the step. [2016-11-17 09:30:36Z INFO ExtensionManager] Getting extensions for interface: ‘Microsoft.VisualStudio.Services.Agent.Worker.Build.ISourceProvider’ [2016-11-17 09:30:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Build.ExternalGitSourceProvider, Agent.Worker [2016-11-17 09:30:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Build.GitHubSourceProvider, Agent.Worker [2016-11-17 09:30:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Build.SvnSourceProvider, Agent.Worker [2016-11-17 09:30:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Build.TfsGitSourceProvider, Agent.Worker [2016-11-17 09:30:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Worker.Build.TfsVCSourceProvider, Agent.Worker [2016-11-17 09:30:36Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:37Z INFO BuildDirectoryManager] Checking if artifacts directory exists: ‘C:\TFS_Build_Agents\BuildAgent_work\1\a’ [2016-11-17 09:30:37Z INFO BuildDirectoryManager] Creating artifacts directory. [2016-11-17 09:30:37Z INFO BuildDirectoryManager] Checking if test results directory exists: ‘C:\TFS_Build_Agents\BuildAgent_work\1\TestResults’ [2016-11-17 09:30:37Z INFO BuildDirectoryManager] Creating test results directory. [2016-11-17 09:30:37Z INFO SourceProvider] Get ‘SourcesDirectory’: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:37Z INFO SourceProvider] Get ‘SourceBranch’: ‘refs/heads/develop’ [2016-11-17 09:30:37Z INFO SourceProvider] Get ‘SourceVersion’: ‘f5f68e010386c418c96282b16098926e6b58880c’ [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] Repository url=https://tfs.contoso.com/tfs/Windows Services/_git/MyProject [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] targetPath=C:\TFS_Build_Agents\BuildAgent_work\1\s [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] sourceBranch=refs/heads/develop [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] sourceVersion=f5f68e010386c418c96282b16098926e6b58880c [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] clean=False [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] checkoutSubmodules=True [2016-11-17 09:30:37Z INFO TfsGitSourceProvider] exposeCred=False [2016-11-17 09:30:37Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:38Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:38Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:38Z INFO ProcessInvoker] Arguments: ‘version’ [2016-11-17 09:30:38Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work’ [2016-11-17 09:30:38Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:38Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:38Z INFO ProcessInvoker] Process started with process id 6860, waiting for process exit. [2016-11-17 09:30:41Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:03.2380308. [2016-11-17 09:30:41Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:41Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Arguments: ‘config --get remote.origin.url’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Process started with process id 4288, waiting for process exit. [2016-11-17 09:30:41Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:41Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:00.3894080. [2016-11-17 09:30:41Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:41Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Arguments: ‘config gc.auto 0’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Process started with process id 3692, waiting for process exit. [2016-11-17 09:30:41Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:00.0560164. [2016-11-17 09:30:41Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:41Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Arguments: ‘config --get-all http.https://tfs.contoso.com/tfs/Windows Services/_git/MyProject.extraheader’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Process started with process id 5052, waiting for process exit. [2016-11-17 09:30:41Z INFO ProcessInvoker] Finished process with exit code 1, and elapsed time 00:00:00.0586334. [2016-11-17 09:30:41Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:41Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Arguments: ‘config --get-all http.proxy’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:41Z INFO ProcessInvoker] Process started with process id 4336, waiting for process exit. [2016-11-17 09:30:42Z INFO ProcessInvoker] Finished process with exit code 1, and elapsed time 00:00:00.0529102. [2016-11-17 09:30:42Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:42Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:42Z INFO ProcessInvoker] Arguments: ‘-c http.extraheader=“AUTHORIZATION: bearer ********” fetch --tags --prune --progress origin’ [2016-11-17 09:30:42Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:42Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:42Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:42Z INFO ProcessInvoker] Process started with process id 460, waiting for process exit. [2016-11-17 09:30:42Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:46Z INFO ProcessInvoker] Finished process with exit code 128, and elapsed time 00:00:04.3307264. [2016-11-17 09:30:46Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:47Z ERR StepsRunner] Caught exception from step: System.InvalidOperationException: Git fetch failed with exit code: 128 at Microsoft.VisualStudio.Services.Agent.Worker.Build.GitSourceProvider.<GetSourceAsync>d__9.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Services.Agent.Worker.Build.BuildJobExtension.<PrepareAsync>d__23.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Services.Agent.Worker.JobExtensionRunner.<RunAsync>d__30.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.<RunAsync>d__0.MoveNext() [2016-11-17 09:30:47Z INFO StepsRunner] Step result: Failed [2016-11-17 09:30:47Z INFO StepsRunner] Current state: job state = ‘Failed’, step failed = True, critical step failed = True [2016-11-17 09:30:47Z INFO StepsRunner] Processing step: DisplayName=‘GitVersion’, AlwaysRun=False, ContinueOnError=False, Critical=False, Enabled=True, Finally=False [2016-11-17 09:30:47Z INFO StepsRunner] Skipping step. [2016-11-17 09:30:47Z INFO StepsRunner] Processing step: DisplayName=‘NuGet restore ***.sln’, AlwaysRun=False, ContinueOnError=False, Critical=False, Enabled=True, Finally=False [2016-11-17 09:30:47Z INFO StepsRunner] Skipping step. [2016-11-17 09:30:47Z INFO StepsRunner] Processing step: DisplayName=‘Build solution **.sln’, AlwaysRun=False, ContinueOnError=False, Critical=False, Enabled=True, Finally=False [2016-11-17 09:30:47Z INFO StepsRunner] Skipping step. [2016-11-17 09:30:47Z INFO StepsRunner] Processing step: DisplayName='Test Assemblies $(BuildConfiguration)*test.dll;-:\obj**’, AlwaysRun=False, ContinueOnError=True, Critical=False, Enabled=True, Finally=False [2016-11-17 09:30:47Z INFO StepsRunner] Skipping step. [2016-11-17 09:30:47Z INFO StepsRunner] Processing step: DisplayName=‘Post Job Cleanup’, AlwaysRun=False, ContinueOnError=False, Critical=False, Enabled=True, Finally=True [2016-11-17 09:30:47Z INFO StepsRunner] Starting the step. [2016-11-17 09:30:47Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:47Z INFO SourceProvider] Get ‘SourcesDirectory’: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:47Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Arguments: ‘remote set-url origin https://tfs.contoso.com/tfs/Windows Services/_git/MyProject’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Process started with process id 6716, waiting for process exit. [2016-11-17 09:30:47Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:00.0792628. [2016-11-17 09:30:47Z INFO ProcessInvoker] Starting process: [2016-11-17 09:30:47Z INFO ProcessInvoker] File name: ‘C:\TFS_Build_Agents\BuildAgent\externals\git\cmd\git.exe’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Arguments: ‘remote set-url --push origin https://tfs.contoso.com/tfs/Windows Services/_git/MyProject’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Working directory: ‘C:\TFS_Build_Agents\BuildAgent_work\1\s’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Require exit code zero: ‘False’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Encoding web name: utf-8 ; code page: ‘65001’ [2016-11-17 09:30:47Z INFO ProcessInvoker] Process started with process id 5748, waiting for process exit. [2016-11-17 09:30:47Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:00.0582813. [2016-11-17 09:30:47Z INFO StepsRunner] Step result: [2016-11-17 09:30:47Z INFO StepsRunner] Current state: job state = ‘Failed’, step failed = True, critical step failed = True [2016-11-17 09:30:47Z INFO JobRunner] Job result: Failed [2016-11-17 09:30:47Z INFO JobRunner] Completing the job execution context. [2016-11-17 09:30:47Z INFO JobRunner] Shutting down the job server queue. [2016-11-17 09:30:47Z INFO JobServerQueue] Fire signal to shutdown all queues. [2016-11-17 09:30:47Z INFO JobServerQueue] Try to upload 1 log files or attachments, success rate: 1/1. [2016-11-17 09:30:48Z INFO JobServerQueue] All queue process task stopped. [2016-11-17 09:30:48Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1. [2016-11-17 09:30:48Z INFO JobServerQueue] Web console line queue drained. [2016-11-17 09:30:49Z INFO JobServerQueue] Try to upload 2 log files or attachments, success rate: 2/2. [2016-11-17 09:30:49Z INFO JobServerQueue] File upload queue drained. [2016-11-17 09:30:49Z INFO JobServerQueue] Timeline update queue drained. [2016-11-17 09:30:49Z INFO JobServerQueue] All queue process tasks have been stopped, and all queues are drained. [2016-11-17 09:30:49Z INFO Worker] Job completed.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 41 (18 by maintainers)

Commits related to this issue

Most upvoted comments

Hi all, I release 2.129.0 agent on github which contains git SChannel support. https://github.com/Microsoft/vsts-agent/releases/tag/v2.129.0

To enable git to use SChannel, you need to pass --gituseschannel during agent config. ex:

 ./config.cmd --gituseschannel

Please try out if you are interested in the feature.

Please reopen this bug.

The git version used is so old that it didn’t support [http] sslBackend = schannel This feature is introduced in this git commit: https://github.com/git-for-windows/git/commit/d81216ee4dd46ae59a388044d1266d6fa9030c19

If Microsoft SChannel is used as a backend all certificates from windows certificate store are used.

In my opinion the agent on windows should use SChannel as default.

PS: The Visualstudio installed git should change this setting, too.

@TingluoHuang , we ran into this problem with our domain’s root certificate. Our fix was slightly different than the one you suggest in the documentation. We modified the ca-bundle.crt file to include our domain’s root cert which we found in the <agent install directory>\externals\git\mingw64\ssl\certs folder.

reopening for consideration

@TingluoHuang Any chances that the new Version will be used in TFS 2018 RTM with change to Schannel as default?