Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mirror Chocolatey with Artifactory

JFrog Artifactory supports NuGet sources. How would you configure Chocolatey to point to an Artifactory server instead of chocolatey.org?

like image 383
spuder Avatar asked Mar 21 '18 17:03

spuder


1 Answers

Create a 'remote' repository that points to Chocolatey's NuGet API:

Enter image description here

Then in Chocolatey, configure an alternative source:

choco source list
choco source Add -Name artifactory -Source https://artifactory.example.com/artifactory/api/nuget/chocolatey
choco source enable --name artifactory
choco source disable --name chocolatey

You can leave both sources enabled and Chocolatey will fall back to secondary sources, or you can force all package downloads to come from Artifactory.

Most Chocolatey packages don't bundle the .msi installer inside them; instead the Chocolatey package contains scripts to fetch installers from elsewhere. This solution will only mitigate issues if chocolatey.org becomes unavailable (e.g choco install splunk-universalforwarder will continue to work even if 'chocolatey.org' is offline, but not if 'splunk.com/downloads' is offline).

like image 60
spuder Avatar answered Oct 16 '22 17:10

spuder