Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-20405

add support for NuGet publish -SkipDuplicate option

    Details

    • Type: Improvement
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.17.0
    • Fix Version/s: None
    • Component/s: NuGet
    • Labels:
      None
    • Notability:
      4

      Description

      Starting in NuGet v5.1 there is support for ignoring pushes where the package already exists in the repository (using the -SkipDuplicate flag). The NuGet client expects to get a 409 response in this case but the Nexus repo manager returns a 400 in all cases

      Reference: https://docs.microsoft.com/en-us/nuget/api/package-publish-resource#response

      >nuget push Example.1.0.20190619.6.nupkg -source example_nuget -SkipDuplicate 
      Pushing Example.1.0.20190619.6.nupkg to 'https://example.com:8443/nexus/repository/nuget-hosted/'... 
      PUT https://example.com:8443/nexus/repository/nuget-hosted/ 
      BadRequest https://example.com:8443/nexus/repository/nuget-hosted/ 18726ms 
      Response status code does not indicate success: 400 (Bad Request).
      

      Expected

      Instead of 400 status code, return 409 status code and equivalent response body that NuGet.org will if the pushed package already exists inside the hosted repository.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Juan Elosegui Juan Elosegui
              Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title