core icon indicating copy to clipboard operation
core copied to clipboard

dotnet nuget push --skip-duplicate generates error telling you that you need to use --skip-duplicate

Open j-aho opened this issue 5 years ago • 2 comments

Description

When you already have a nuget package in a private nuget repository, you will get an error when using --skip-duplicate option.

When running the following command: dotnet nuget push "test-package.6.1.1.nupkg" -k "*******" -s "https://127.0.0.1/nuget/test-tools/" --no-symbols --skip-duplicate

The output generated is the following: Pushing test-package.6.1.1.nupkg to 'https://127.0.0.1/nuget/test-tools/'... PUT https://127.0.0.1/nuget/test-tools/ Conflict https://127.0.0.1/nuget/test-tools/ 6990ms To skip already published packages, use the option --skip-duplicate error: Response status code does not indicate success: 409 (Package Already Exists). ...

Exit code is 1

Configuration

  • Which version of .NET is the code running on? 5.0.200
  • What OS and version, and for Linux, what distro? Ubuntu 16.04.6 LTS (Xenial Xerus)
  • What is the architecture (x64, x86, ARM, ARM64)? amd64
  • Do you know whether it is specific to that configuration? Only run in default config

Regression?

This not worked in dotnet core 2.1 (Microsoft Docker SKD image), haven't tested in earlier versions nor in 3.x

Other information

Private nuget service is proget

Expected result

The suggestion to use --skip-duplicate and listing other options (same as --help) shouldn't be displayed, only a warning text that package already exists in the repository and the exit code should be 0.

j-aho avatar Mar 05 '21 10:03 j-aho

@rrelyea @nkolev92 this looks like a NuGet issue, can you transfer this to https://github.com/NuGet/Home ?

antonfirsov avatar Mar 05 '21 15:03 antonfirsov

This issue was moved to NuGet/Home#10633

mairaw avatar Mar 05 '21 22:03 mairaw