Skip to content

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

Open
@mairaw

Description

@mairaw

Issue moved from dotnet/core#6023

  • Please respond to @JJ-Niemi.

From @JJ-Niemi on Friday, March 5, 2021 10:41:39 AM

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions