admin管理员组

文章数量:1405533

I have an ASP.NET Core application using Identity for authentication/authorization that I'm trying to configure as a NuGet server. The NuGet server piece works great if I remove any Authorize attributes from the controllers that back the API endpoints, but when I add the attributes back in, they don't work as an authenticated feed.

I add the feed with the following command line:

dotnet nuget add source https://localhost:7228/nuget/v3/index.json 
       --name myfeed --username "<<uname>>" --password "<<pwd>>" 

This reports success and adds the relevant entries into NuGet.config but when I attempt to restore any packages from the feed I get:

Unable to load the service index for source https://localhost:7228/nuget/v3/index.json.
Response status code does not indicate success: 404 (Not Found).

I'm not sure if it's just impossible to use Identity as the backing authentication mechanism for something like NuGet or if there is some other mechanism through which I need to add the credentials?

I have an ASP.NET Core application using Identity for authentication/authorization that I'm trying to configure as a NuGet server. The NuGet server piece works great if I remove any Authorize attributes from the controllers that back the API endpoints, but when I add the attributes back in, they don't work as an authenticated feed.

I add the feed with the following command line:

dotnet nuget add source https://localhost:7228/nuget/v3/index.json 
       --name myfeed --username "<<uname>>" --password "<<pwd>>" 

This reports success and adds the relevant entries into NuGet.config but when I attempt to restore any packages from the feed I get:

Unable to load the service index for source https://localhost:7228/nuget/v3/index.json.
Response status code does not indicate success: 404 (Not Found).

I'm not sure if it's just impossible to use Identity as the backing authentication mechanism for something like NuGet or if there is some other mechanism through which I need to add the credentials?

Share Improve this question edited Mar 22 at 6:54 marc_s 756k184 gold badges1.4k silver badges1.5k bronze badges asked Mar 21 at 22:53 mxcolinmxcolin 1151 silver badge9 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Basically 404 error indicated that requested resources is not found, please check /nuget/v3/index.json. Please check that endpoint has been setup properly and missing middleware. Please double check it on your end.

本文标签: How do I configure an ASPNET Core app with identity as an authenticated NuGet feedStack Overflow