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/.*