繁体   English   中英

如何将“dotnet restore”与需要进行身份验证的提要一起使用?

[英]How to use 'dotnet restore' with a feed that need to authenticate with?

我的项目使用了一个自定义提要,在使用它之前我需要对其进行身份验证。 https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-restore告诉我应该使用--interactive标志。 然而,这并没有改变任何东西。 我收到错误:

/usr/share/dotnet/sdk/3.1.201/NuGet.targets(124,5):错误:无法为源https 加载服务索引://myproject.pkgs.visualstudio.com/_packaging/MyFeed/nuget/ v3/索引 x.json。 [/home/xyx/code/MyApp.csproj] /usr/share/dotnet/sdk/3.1.201/NuGet.targets(124,5):错误:响应状态码不表示成功:401(未授权)。 [/home/xyx/code/MyApp.csproj]

如何授权我的提要?

要让 dotnet 要求您提供凭据,您需要安装https://github.com/microsoft/artifacts-credprovider 它解决了这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM