dotnet tool install have trouble installing when an private feed is in nuget.config
See original GitHub issue@DerAlbertCom commented on Fri Jun 29 2018
Issue Title
dotnet tool install -g foobar does not install any tool if private nuget feed is in the nuget.config which requires authentication.
General
I tried ‘dotnet tool install -g sourcelink’, and have in the the global nuget.config the company nuget feed from vsts.
C:\Program Files\dotnet\sdk\2.1.301\NuGet.targets(114,5): error : Fehler beim Abrufen von Informationen zu "sourcelink" aus der Remotequelle "https://XYZ.pkgs.visualstudio.com/_packaging/172bc92f-50b3-48bc-b4cf-9555b7f0fd10/nuget/v3/flat2/fo/index.json". [C:\Users\DerAl\AppData\Local\Temp\ctdjxp0q.bbs\restore.csproj]
C:\Program Files\dotnet\sdk\2.1.301\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Users\DerAl\AppData\Local\Temp\ctdjxp0q.bbs\restore.csproj]
If i comment out the private feed out in then nuget.config, then the tool get’s installed.
nuget restore has not problem with the nuget feed. dotnet restore (which should not be used with VSTS because you have to store a Cleartext PAT in the nuget.config) clearly has the same problem like dotnet tool
Possible Workaround
See https://github.com/dotnet/sdk/issues/9555#issuecomment-802015061 in this issue discussing --ignore-failed-sources
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:45
- Comments:60 (3 by maintainers)
Top Results From Across the Web
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 >dotnet tool install command - .NET CLI
The dotnet tool install command installs the specified .NET tool on your machine. ... For more information, see Common NuGet Configurations.
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 >Cannot install anything using dotnet tool install command
In my case, it was failing because I have a private feed, which needs authentication (despite that configured in nuget.config).
Read more >NuGet problems when installing X
When I try to install the X tools for ServiceStack, I get a strange NUGET error for my private MyGet repo. I have...
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 FreeTop 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
Top GitHub Comments
Really? A Workaround? Why not just fix this. dotnet cli with authenticated feeds is a mess.
I’m really tired of this problems around the authenticated nuget feeds. For this reason we can not use Hosted Build Agents in Azure DevOps. We have to use a own Build Agent with CLEARTEXT Credentials in the config file.
We cannot use dotnet cli correctly from the command line on the dev machine without put the cleartext credentials in the dev machines.
Yes, for all this problems are issues filed, mostly with no information when it will be fixed, or zero reaction.
My workaround because I also run in this issue on Azure DevOps (current VS2017 and VS2019 and Ubuntu with NuGet 4.9.4 and 5.0.0):
Create a single
NuGet.config
with only the nuget.org feed (you can also name it likeNuGet-OfficialOnly.config
Now I am able to install via
dotnet tool
Run