0

I just set up a Chocolatey simple server. I can get to the default instruction page and can push a local package, but if I choco list -s mychocoserver.com, I get "0 packages found" and I can't install using the server as the source.

The package is in the App_Data\Packages directory.

Just to note, the default page indicates to use https://mychocoserver.com/chocolatey as my source for push/api key, but in my zeal to try it out, I pushed the package to just the server (without the "/chocolatey" at the end). When I try to push again to the suggested path, I get an "An error has occurred. It's possible the package version already exists on the repository.", so it appears the server knows the package is there.

What's going on here?

Teknowledgist
  • 351
  • 1
  • 3
  • 13

1 Answers1

0

The problem is that while you can push a package to a Chocolatey server by the server name only, you have to use the full URL to list or pull a package. Thus, both of these work:

choco push mypackage.nupkg -s "https://mychocoserver.com"
choco push mypackage.nupkg -s "https://mychocoserver.com/chocolatey"

However, while this works:

choco install mypackage -s "https://mychocoserver.com/chocolatey"

this does not:

choco install mypackage -s "https://mychocoserver.com"

To make it worse:

choco list -s "https://mychocoserver.com"

does not return an error (making it seem like a valid source), but instead returns "0 packages found". Likewise:

choco list -s "https://mychocoserver.com/chocolatey"

does return the packages in the repository.

Teknowledgist
  • 351
  • 1
  • 3
  • 13