I want to build my .net core application using linux's build agent. But if my nuget is hosted in tfs packages or Azure Artifacts, it can't be restored.
Always get an error when using the dotnet step to restore nuget
/usr/share/dotnet/sdk/2.2.300/NuGet.targets(121,5): error : Unable to load the service index for source http://tfsServer/ProjectCollection/_packaging/guid/nuget/v3/index.json.
/usr/share/dotnet/sdk/2.2.300/NuGet.targets(121,5): error : Response status code does not indicate success: 401 (Unauthorized)
I Try:
Refer to the practices mentioned in https://github.com/microsoft/artifacts-credprovider to install the plugin in the linux agent and specify the environment variable VSS_NUGET_EXTERNAL_FEED_ENDPOINTS at compile time. But no effect.
If you are not using nuget of tfs itself. A nuget built with a blank site referenced by nuget.server can be restored normally.
Tfs Server version: Tfs 2018 Update2
Build Agent Linux Server: centos 7.2
Agent version: 2.131