We are evaluating Nexus and are trying to set up a Nuget proxy repository that allows only a limited set of approved packages to be pulled in.
For NewtonSoft.Json and mono.cecil the following routing rule works to some degree:
- mode: ALLOW
With this I am able to use
dotnet add package Mono.Cecil to add version 0.10.0 but adding version 0.10.0-beta7 fails.
I tried allowing several more packages but I can’t get any other to work.
E.g for Jaeger I have:
I believe that covers all the dependencies but I still get:
info : Adding PackageReference for package 'Jaeger' into project '/home/user/workspace/dotnetcore/sample1/sample1.csproj'. info : Restoring packages for /home/user/workspace/dotnetcore/sample1/sample1.csproj... info : CACHE https://<uri>/repository/nuget.org-proxy/FindPackagesById()?id='Jaeger'&semVerLevel=2.0.0 error: Unable to find package Jaeger. No packages exist with this id in source(s): <source> error: Package 'Jaeger' is incompatible with 'all' frameworks in project '/home/user/workspace/dotnetcore/sample1/sample1.csproj'.
The documentation on Routing Rules is very light on this subject.
Is there something wrong with the expressions? I’m building them by taking the URL from the download link on nuget.org and stripping the first parts.
How can I see why a certain package was refused?
Perhaps I need to allow more dependencies?
Which logs can I check? nexus.log and request.log don’t show more information but perhaps I missed something.