Ask A Question

View Question

The error occurs when attempting to restore packages for a .NET project using "dotnet restore -Source 'source-url' " on Linux and macOS, the command works as intended windows.

The feed is setup to require authentication and nuget stores valid credentials for the source in the configfile, same credentials were used on all platforms. ProGet version is 4.8.5 build 1

dotnet restore error:
Retrying 'FindPackagesByIdAsyncCore' for source 'https://url/nuget/feed/FindPackagesById()?id='Microsoft.NETCore.App''.
Response status code does not indicate success: 500 (Internal Server Error).

ProGet Error log:
An error occurred in the web application: Value cannot be null. Parameter name: userName
URL: http://url/nuget/feed/FindPackagesById()?id='Package'
Referrer: (not set)
User: (unknown)
User Agent: NuGet MSBuild Task/4.3.0 (Linux 4.9.49-moby #1 SMP Wed Sep 27 00:36:29 UTC 2017)
Stack trace: at Inedo.ProGet.Extensibility.UserDirectories.BuiltInDirectory.TryGetAndValidateUser(String userName, String password)
at Inedo.ProGet.WebApplication.ProGetHttpModule.ValidateUser(HttpApplication app, String userName, String password)
at Inedo.Web.InedoHttpModule.AuthenticateRequestAsync(HttpApplication app)
at Inedo.Web.InedoHttpModule.ProcessBegin(Object sender, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Product: BuildMaster
Version: 5.8.1

This appears to be a bug/limitation in dotnet on Linux; basically, at this time, it does not support authenticated (private) feeds at all. Unfortunately there is no work-around, you just have to make the feed allow anonymous. Microsoft is working on it, but has no ETA on a resolution/

Answer Question