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?