dotnet tool install fails with multiple feeds
See original GitHub issueFrom @ppumkin on September 26, 2018 10:20
Issue Title
When I try to install a global tool, for example coverlet I get an error.
If I try any other tool I get the same error
General
The error message is as follows
dotnet tool install --global coverlet.console
C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets(114,5): error : Unable to load the service index for source https://private_feed.pkgs.visualstudio.com/_packaging/private_feed/nuget/v3/index.json. [C:\Users\piotr.kula\AppData\Local\Temp\e4hqjeii.vid\restore.csproj]
C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Users\piotr.kula\AppData\Local\Temp\e4hqjeii.vid\restore.csproj]
The tool package could not be restored.
Tool 'coverlet.console' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
The problem is that we use private NuGet feeds from Azure DevOps packages and symbol server.
So two things are happening here.
- When access to a source feed fails the entire tool bombs out.
- Expected to use NEXT source, which would have been NuGet.
- Authorisation is not working from the command line
- Expected authorisation window to show or use credentials Visual Studio has already created
Workaround
- In visual studio, Disable the private feed and run the dotnet tool install.
- Installs as expected.
- Enable private feed after completed
Copied from original issue: dotnet/core#1962
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Troubleshoot .NET tool usage issues
Tool installation requires access to the NuGet feed that contains the tool package. It fails if the feed isn't available. You can alter...
Read more >Cannot install anything using dotnet tool install command
it looks like dotnet tool iterates the nuget.config sources and when one fails, it doesn't continue with next ones.
Read more >Unable to install dotnet tool from private nuget feed
I have a dotnet tool that is published as a Nuget package to a private feed. From a YAML pipeline I would like...
Read more >Install dotnet global tool with private NuGet feed - Matt DuFeu
In this post I show how to solve a 401 Unauthorised error while installing a .NET Global Tool and you have a private...
Read more >dotnet-tool-install: Installs the specified .NET tool on ...
The dotnet tool install command provides a way for you to install . ... If the same package and version is in multiple...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
2.2.1xx added option
--ignore-failed-sources
can be used in this case. This can make workaround easier. https://github.com/dotnet/cli/pull/9830reg the root cause auth issue. Could you restore a normal project in command line without special nuget.config?
Could you try to use
--configfile
and pass the path in the nuget.config with auth config?@sparker2000 maybe you could use --configfile to pass a different config file to use