I've configured a private build agent to use with VSTS.
I installed MSBuild tools and installed the agent as a service. Now I'm trying to build a MVC 5 project with it. The build fails in the Use Nuget 4.3.0 task. After queueing a new build with diagnostics, here are the last lines:
2018-04-04T18:58:46.7604184Z ##[debug]checking cache: C:\agent\_work\_tool\NuGet\4.3.0\x64
2018-04-04T18:58:46.7609109Z ##[debug]not found
2018-04-04T18:58:46.7613274Z ##[debug]Agent.Version=2.131.0
2018-04-04T18:58:46.7614366Z ##[debug]Agent.ToolsDirectory=C:\agent\_work\_tool
2018-04-04T18:58:46.7619860Z ##[debug]evaluating 0 versions
2018-04-04T18:58:46.7621212Z ##[debug]match not found
2018-04-04T18:58:46.7628225Z ##[debug]Querying versions list
2018-04-04T18:58:46.8585728Z ERR:unable to verify the first certificate
2018-04-04T18:58:46.8587980Z ##[debug]task result: Failed
So I get this message: unable to verify the first certificate.
My first thought was the firewall blocking the nuget.exe download, but if I connect to the server, I can manually download it from this link (I believe the task tries to download from here):
https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe
How to fix this problem?