【发布时间】:2021-08-16 23:20:44
【问题描述】:
我正在尝试在命令行上运行 dotnet restore --configfile NuGet.config my-solution.sln 以从私有 nuget 源恢复包,但我无法使用私有 nuget 进行身份验证,并且出现此错误:
Retrying 'FindPackagesByIdAsyncCore' for source 'http://my.private.nuget/source/FindPackagesById()?semVerLevel=2.0.0'.
Response status code does not indicate success: 401 (Unauthorized).
但是我能够从visual studio 成功恢复包,当我尝试从visual studio 恢复包时,我收到了要求提供凭据的提示,并且在添加凭据后恢复正确。
当我通过命令行恢复时,我正在尝试找出需要在哪里添加私有 nuget 的凭据。
【问题讨论】:
-
你试过传递
--interactive吗? -
不,你能告诉我如何通过 --interactive 和 dotnet restore @kit
-
在你的情况下是
dotnet restore --configfile NuGet.config my-solution.sln,但我建议查看其他评论者发布的问题。 -
--交互式没有帮助。我已经回答了我自己的问题,即如何在不安装任何东西的情况下解决它