Dotnet restore authenticated nuget teamcity feed not working

Hi,

I have setup Teamcity to be our nuget server and we do not want the guest user enabled. 

When I add a dotnet restore build step I get an authenticated errror  with response status code 401.

I have the TeamCity Nuget feed credentails as well.

Build feature screenshot below

If I enable the guest login then everything works fine. I have tried replacing the Nuget Feed Credentials with the actual URL and it does not work.

Another quick thing on inspecting the log is that if a NuGet Package has been added to the project its trying to fetch this package from both sources i..e nuget.org and the teamcity nuget server as well. Is this the intended behaviour as the package might not exists on Teamcity and should be pulled from nuget.org

Thanks in advance

 

Regards

Rajesh

 

0
1 comment

Hi Rajesh,

please note that TeamCity will ignore the "NuGet Feed Credentials" when trying to access the integrated nuget feed, so you can and should remove it.

At the moment, the dotnet restore requires guest authentication to work from within a build step. We have this issue in our tracker to fix that https://youtrack.jetbrains.com/issue/TW-52337, please make sure to watch and vote it to stay up to date. It also contains possible workarounds for your problem.

Could you try them and see if that would work for you?

0

Please sign in to leave a comment.