core icon indicating copy to clipboard operation
core copied to clipboard

dotnet nuget push with disabled buffering cannot upload to Azure DevOps

Open danm-de opened this issue 7 years ago • 6 comments

Issue Title

dotnet nuget push --disable-buffering does not work with Azure DevOps NuGet Feed + Integrated Windows Authentication

General

.Net Core 3.0 SDK (3.0.100) dotnet tool version 3.0.100 Azure DevOps Server 2019.0.1 Patch 3

When adding the --disable-buffering option I cannot not push/upload NuGet packages using Integrated Windows Authentication. I receive the following error message:

C:\Program Files\dotnet\dotnet.EXE" nuget push "package.1.0.0.nupkg" --disable-buffering --api-key AzureDevOps --source MyCompanyAzureDevOps
No API Key was provided and no API Key could be found for 'https://server/nuget/v2/'. To save an API Key for a source use the 'setApiKey' command.
Pushing package.1.0.0.nupkg to 'https://server/nuget/v2/'...
PUT https://server/nuget/v2/
BadRequest https://server/nuget/v2/
Response status code does not indicate success: 400 (Bad Request - Die Anforderung an den Server enthielt keinen X-NuGet-ApiKey-Header, dieser ist aber selbst dann erforderlich, wenn Anmeldeinformationen angegeben wurde. Legen Sie diesen bei Verwendung von "NuGet.exe" mit der Option "-ApiKey" auf einen beliebigen Wert fest, z. B. "-ApiKey AzureDevOps". (DevOps-Aktivitäts-ID: 37BCF211-00B0-4E0F-AC94-41C731CCF59C)).

Without --disable-buffering everything works fine:

C:\Program Files\dotnet\dotnet.EXE" nuget push "package.1.0.0.nupkg" --disable-buffering --api-key AzureDevOps --source MyCompanyAzureDevOps
Pushing package.1.0.0.nupkg to 'https://server/nuget/v2/'...
PUT https://server/nuget/v2/
Accepted https://server/v2/
Your package was pushed.

danm-de avatar Oct 09 '19 15:10 danm-de

It seems that I am not the only one:

Caution: when this option is used, integrated Windows authentication might not work.

Source: http://www.nuke.build/api/Nuke.Common/Nuke.Common.Tools.NuGet.NuGetPushSettings.html#Nuke_Common_Tools_NuGet_NuGetPushSettings_DisableBuffering

danm-de avatar Oct 11 '19 06:10 danm-de

@danm-de - This looks like a NuGet issue. Can you please move this over to nuget/home ?

KoteshBoda avatar Oct 18 '19 18:10 KoteshBoda

@rrelyea Is this something you can help with?

carlossanlop avatar Oct 31 '19 00:10 carlossanlop

@rrelyea friendly ping on this issue. Should we transfer this to dotnet/sdk or nuget/home?

mairaw avatar May 14 '20 01:05 mairaw

Nuget/home for this and any nuget commands. We own restore, pack and anything after “nuget”

rrelyea avatar May 14 '20 01:05 rrelyea

We switched from Azure DevOp to another software months ago. Problem solved, thanks.

danm-de avatar May 15 '20 16:05 danm-de