Not coming from a NuGet background, I don't understand how to setup Nexus to serve up Chocolatey packages.
The package contents are installed into c:\programdata\chocolatey\lib<package id>. Chocolatey takes a registry snapshot to compare later. If there are automation scripts (usually PowerShell), they run at this time.
Here is how you do it:
--source
flag to when installing a package.The NuGet tab under hosted repo created above will have the Package Source and Personal API Key.
So if hosted repo has:
Package Source = "https://example.com/nexus/service/local/nuget/choco-releases/"
Personal API Key = "d8471cc1-d350-3e45-a0c2-95d0b938e1d9"
Then the call to package and publish your private mypackage
package would look like this:
choco pack
choco push --source "'https://example.com/nexus/service/local/nuget/choco-releases/'" -k="'d8471cc1-d350-3e45-a0c2-95d0b938e1d9'"
To install packages from both private and public sources, use the group repository as the source. The NuGet tab under group repo created above will have the Package Source to use.
So if the group repo has:
Package Source = "https://example.com/nexus/service/local/nuget/choco-all/"
Then the call to install both your private and publicly available packages would look something like this:
choco install jdk8 mypackage --source "'https://example.com/nexus/service/local/nuget/choco-all/'"
When the jdk8
package is not in the private repo; Nexus will pull it from chocolatey.org, cache it in the proxy repo, then send it on to where choco install
is called.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With