Misleading error message during NuGet Restore when not authenticated to a feed #12403
Labels
Area:Authentication
Area:ErrorHandling
warnings and errors/log messages & related error codes.
Area:Logging
Functionality:Restore
Priority:2
Issues for the current backlog.
Type:Bug
NuGet Product Used
NuGet.exe
Product Version
6.4.0
Worked before?
No
Impact
It's more difficult to complete my work
Repro Steps & Context
An error bearing an incorrect message occurs during a NuGet Restore action when the current user is not authenticated to the referenced feed.
For example:
This error occurs during an Azure DevOps pipeline build when the project-scoped build identity
{Project Name} Build Service ({Org Name})
is omitted from the referenced feed's permissions (assuming an Azure DevOps feed).The fix for this is easy—simply add the project-scoped build identity to the feed's permissions.
Unfortunately, however, the error message is misleading. It doesn't describe the root problem, leaving developers and DevOps engineers in the dark as to how to address it. The abundance of reports and attempted/failed solutions found at StackOverflow and elsewhere attest to this.
To reproduce:
git push
nuget restore
step to the pipelinenuget restore
step, reference the feedgit push
the code to the repositoryThe message can be adjusted to more accurately reflect the error it attempts to describe.
Verbose Logs
The text was updated successfully, but these errors were encountered: