admin管理员组文章数量:1332339
I have a project that uses an authenticated NuGet feed on Azure DevOps. I can restore NuGet packages in the solution just fine, but it seems when I try to use dotnet to restore it doesn't want to work. Here is what I type and what I get:
dotnet restore --interactive
Determining projects to restore...
C:\Users\...\MyProject.UnitTests.csproj : error NU1301: Unable to load the service index for source /.../nuget/v3/index.json. [C:\Users\..\MyProject.sln]
Failed to restore C:\Users\MyProject.UnitTests.csproj (in 6.85 sec).
4 of 5 projects are up-to-date for restore.
Obviously removed some parts of the path for security, but I verified that the path is correct and I can load it through a browser (and again, I can restore just fine through VS). The --interactive
option doesn't seem to make any difference. Why would this be inaccessible? I also tried installing the credentials manager but without any change.
Ultimately I'm trying to build a PowerShell script to build several configurations at once (and an installer, etc.). First though I need to have it build which does an automatic restore which is not working.
I have a project that uses an authenticated NuGet feed on Azure DevOps. I can restore NuGet packages in the solution just fine, but it seems when I try to use dotnet to restore it doesn't want to work. Here is what I type and what I get:
dotnet restore --interactive
Determining projects to restore...
C:\Users\...\MyProject.UnitTests.csproj : error NU1301: Unable to load the service index for source https://pkgs.dev.azure/.../nuget/v3/index.json. [C:\Users\..\MyProject.sln]
Failed to restore C:\Users\MyProject.UnitTests.csproj (in 6.85 sec).
4 of 5 projects are up-to-date for restore.
Obviously removed some parts of the path for security, but I verified that the path is correct and I can load it through a browser (and again, I can restore just fine through VS). The --interactive
option doesn't seem to make any difference. Why would this be inaccessible? I also tried installing the credentials manager but without any change.
Ultimately I'm trying to build a PowerShell script to build several configurations at once (and an installer, etc.). First though I need to have it build which does an automatic restore which is not working.
Share Improve this question asked Nov 20, 2024 at 21:03 sfaustsfaust 2,37332 silver badges70 bronze badges 1- 1 Why the close request? If this is answered elsewhere please point me to where, I couldn't find it... – sfaust Commented Nov 25, 2024 at 17:20
1 Answer
Reset to default -1You will need to get the NuGet credential provider from this repo https://github/microsoft/artifacts-credprovider and follow the instructions in the README.md file and see if that helps.
If it still doesn’t work, try building the application using visual studio and it should pop up a sign in screen.
本文标签: netdotnet restore will not ask for credentialsStack Overflow
版权声明:本文标题:.net - dotnet restore will not ask for credentials - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742328332a2454176.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论