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

Inconsistency in handling of repository targets for NuGet

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.10
    • Fix Version/s: 2.11.1, 3.0.0-m3
    • Component/s: NuGet
    • Labels:
    • Story Points:
      0.5
    • Sprint:
      Sprint 31, Sprint 32

      Description

      If you send a delete request to a NuGet repository the path used to resolve the repository target permissions does not include the leading "/". This is inconsistent with other repositories in Nexus.

      For instance, this command:

      NuGet.exe delete SonatypeNexusCSharp 1.0.0 -ApiKey 3fa626ae-e597-3840-96fe-caa35a7f7bed -Source http://192.168.1.50:8081/nexus/service/local/nuget/nnn

      Results in a path of "SonatypeNexusCSharp/1.0.0" being used:

      2014-11-12 09:33:43 DEBUG [qtp327533081-125] rich org.sonatype.nexus.proxy.targets.DefaultTargetRegistry - Resolving targets for repository='nugroup' for path='SonatypeNexusCSharp/1.0.0'

      This means a standard target of "/SonatypeNexusCSharp/.*" used in a repository target permission will not match.

      If you try the same delete through the UI the request will go through "/service/local/repositories/<repo-id>/content", and the target starting with "/" will work.

      Workaround

      Change the regular expression in the target to indicate the leading "/" is optional. For example:

      /?SonatypeNexusCSharp/.*
      

        Attachments

          Activity

            People

            Assignee:
            rseddon Rich Seddon
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title