【发布时间】:2019-02-04 02:42:07
【问题描述】:
我们有 TFS 版本 16.122.27409.2 和内部托管的构建服务器。当构建尝试从 TFS 提要恢复包时,我们的自动构建系统遇到问题:
Unable to load the service index for source http://ngt-tfs:8080/tfs/NGT-Collection-01/_packaging/ad100c06-9a78-4ff2-b37a-23518a33370b/nuget/v3/index.json.
Response status code does not indicate success: 401 (Unauthorized).
NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source http://ngt-tfs:8080/tfs/NGT-Collection-01/_packaging/ad100c06-9a78-4ff2-b37a-23518a33370b/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
到目前为止我尝试过的事情:
- 关闭构建服务器上的自动代理检测
- 在构建服务器上禁用防病毒/防火墙
- 将构建服务器的 windows 帐户添加为 TFS Nuget Feed 权限的所有者
- 将 VS 2017 更新到最新版本
- 尝试在构建定义中使用 nuget.config 文件,而不是从下拉列表中选择提要
【问题讨论】:
-
您是否事先使用
NuGet Installer任务来确保有合适的 NuGet 版本可用? -
是的,它设置为 NuGet 版本 4.6.2
标签: visual-studio tfs nuget tfsbuild nuget-package-restore