Set Up Remote NuGet Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

When working with remote NuGet repositories, your Artifactory configuration depends on how the remote repositories are set up.

Different NuGet server implementations may provide package resources on different paths, therefore the feed and download resource locations in Artifactory are customizable when proxying a remote NuGet repository.

Note

If you are using NuGet V2, select a Remote registry from the following list of supported registries:

Remote Registry

Download Context Path

Feed Context Path

https://www.nuget.org

api/v2/package

api/v2

https://www.powershellgallery.com

api/v2/package

api/v2

https://proget.inedo.com

api/v2/package

api/v2

https://nuget.devexpress.com

package

""

https://community.chocolatey.org

api/v2/package

api/v2

https://www.nuget.org/packages/Symbol/

N/A

N/A

https://msdl.microsoft.com/download/symbols

N/A

N/A

To create a Remote Repository, in the Administration module, go to Repositories | Repositories | Remote, and click New Remote Repository.

Here are some examples:

  • For the NuGet gallery configure the NuGet v3 Feed URL http://host:port/api/v3/nuget/repoKey while the URL can stay with http://host:port/artifactory/api/nuget/repoKey/. Therefore, to define this as a new repository you should set the repository URL to https://www.nuget.org , its Feed Context Path to api/v2 and the Download Context Path to api/v2/package .

    remote_nuget_remote.png

    Note

    When accessing the remote https://www.nuget.org/api/v3/Packages, you are required to use API v3.

  • For NuGet v3 API and metadata configuration it is necessary to configure the NuGet V3 Feed http://[host:port]/api/v3/nuget/repoKey while the URL can stay with http://[host:port]/artifactory/api/nuget/repoKey/.

  • Another Artifactory repository (i.e. a Smart Remote NuGet Repository) exposes its feed resource at [http://host:port]/artifactory/api/nuget/repoKey/Packages and its download resource at http://[host:port]/artifactory/api/nuget/repoKey/Download.

    To define this as a new repository you should set the repository URL to http://[host:port]/artifactory/api/nuget/repoKey, its Feed Context Path should be left empty and its Download Context Path to Download, like this:

    NuGet Settings.jpg

Using a proxy server

If you are accessing NuGet Gallery through a proxy server you need to define the following two URLs in the proxy's allow list:

  1. *.nuget.org

  2. az320820.vo.msecnd.net (NuGet Gallery's current CDN domain)