The NuGet Gallery is the central repository used by all package authors and consumers. To reduce duplicate downloads and improve download speeds for your developers and CI servers, you should proxy the NuGet Gallery with Nexus. If you use other external repositories, you should also proxy these.
To proxy an external NuGet repository, you simply create a new Proxy
Repository as documented in Section 6.2, “Managing Repositories”. The
Provider has to be set to
NuGet. The Remote Storage Location has
to be set to the URL of the remote repository you want to proxy. The
URL for the main NuGet Gallery repository is
A complete configuration for proxying the NuGet Gallery is visible in Figure 16.1, “NuGet Proxy Repository Configuration for the NuGet Gallery”.
The repository configuration for a NuGet proxy repository has an additional tab titled NuGet as visible in Figure 16.2, “NuGet Gallery with Package Source URL”. It displays the Package Source URL that is URL where the repository is available as a NuGet repository.
By default, searches in NuGet repositories in Nexus will be passed through to the remote repositories, and the search results are merged with internal search results and included in an internally managed index. This merging has to make some assumptions to generate component counts.