Hello i am trying to register a fileshare location as a package source but am getting an error
Register-PackageSource : Source location ‘\server\Software\Chocolatey\Cho
coRepo’ is not valid for this provider
Register-PackageSource -Name 'LANRepo' -Location $LANRepo -ProviderName Chocolatey -Trusted -Force -ForceBootstrap -Verbose
If all you have is the Chocolatey provider, then it only accepts the URL of a Chocolatey repo. It doesn’t do file shares.
Ok Thanks Don
the oneget module lets you use a file share as a source
I have a nugget server using a file share I can use that thx again
Well, let’s be precise about terminology. Just for people who come along later - I realize you probably know these things already.
“OneGet” isn’t a thing per se; it’s “PowerShell Package Manager.”“OneGet” was a very early pre-release name.
And the PPM uses providers to connect to repositories. The idea is that PPM can talk to any repository - NuGet, file shares, etc - if you have the right provider. Register-PackageSource has a -ProviderName parameter, which is where you tell it which provider to use. That’s a mandatory parameter.
Different providers accept different sources. For example, the Chocolatey provider is usually used with a URL (ideally HTTPS so that you can mutually authenticate the server).