TFS2017.2 NuGet restore task - ETIMEDOUT 93.184.221.200:443

☆樱花仙子☆ 提交于 2019-12-04 19:58:23

问题


I have couple of build definitions that are using the "old" NuGet Installer task to restore the dependencies from our internal TFS feed (same collection); the feed url is specified through the NuGet source parameter:

The restore process is working fine as below:

Switching to the newer version of the task is causing the build failure:

How can I disable the connection attempt to 93.184.221.200:443 due to the fact that the build agent doesn't have internet access?

I'm using TFS 15.117.26714.0.

Update 1

I copied nuget.exe to c:\nuget folder then added the folder to the PATH environment variable. Same result

Update 2

I copied nuget.exe to C:\B\1_tool\NuGet\4.0.0\x64 folder; the result is below:


回答1:


Update 3 - Workaround

In order to trick the "new" NuGet task to find the nuget.exe in the tool cache you need to create a dummy file called x64.complete in the {agent work folder}\_tool\NuGet\4.0.0 folder and copy the nuget.exe file in the {agent work folder}\_tool\NuGet\4.0.0\x64 folder




回答2:


Seems there is something wrong with the new version of the task. Normally it will not access api.nuget.org if you disabled Use packages from NeGet.org.

Reference this similar issue : NuGet restore task fails from the Xamarin.Android template in TFS 2017 update 2

Also this related feedback (not resolved yet) : NuGet Push task fails and has no retry option

However, you can try to enable the internet access for your build agent, then try it again.

If that still not work, please try to enable system.debug during the build. Then capture and share the logs here for further troubleshoot.

As a workaround, you can use the old version for now.




回答3:


Further to ds19's problem and workaround (thank you!), we were having a very similar issue with VS2017. At our place Servers, as a rule, do not get access to the internet. With our upgrade to VS2017 and TFS2017 (Update 3) this rule had to be relaxed.

Initially, we solved the build issue by using ds19's Update 3 - Workaround but this still left us unable to use anything but nuget 4.0.0 since the Nuget Tool Installer task still gave the timeout error.

After working through this with MS, they advised us to add the CDN site (cs9.wpc.v0cdn.net) to our proxy’s whitelist. Once we did this we we also able to use the Nuget Tool Installer task, in addition to the Nuget Restore.




回答4:


To get this working, we modified our Build Agents' environment vars, adding

http_proxy=http://wsa.arz.de:3128
https_proxy=http://wsa.arz.de:3128

Hope this helps



来源:https://stackoverflow.com/questions/46040239/tfs2017-2-nuget-restore-task-etimedout-93-184-221-200443

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