4

I created a Chocolatey feed, named "Chocolatey", in ProGet. Now how do I use it from Chocolatey?

I tried running this command to add the source:

PS> choco source add --name=ProGet --source="http://my-proget-server/feeds/Chocolatey"
Chocolatey v0.10.8
Added ProGet - http://my-proget-server/feeds/Chocolatey (Priority 0)

and the command worked in as much as it lists "ProGet" as a source:

PS> choco source list
Chocolatey v0.10.8
chocolatey - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
ProGet - http://my-proget-server/feeds/Chocolatey | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.

I then disabled the default source:

PS> choco source disable --name=chocolatey
Chocolatey v0.10.8
Disabled chocolatey

But I must have setup the ProGet source wrong as choco search doesn't work:

PS> choco search curl
Chocolatey v0.10.8
The remote server returned an error: (400) Bad Request.
Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93

1 Answers1

3

I should have set the source parameter of the choco source add command to the "Package Source URL" of the feed. The value I provided is actually the 'details' page for the feed in the ProGet webapp and that page shows the package source URL. In my case, the correct command to run (after removing the bad source) was:

choco source add --name=ProGet --source="http://my-proget-server/nuget/Chocolatey"

Here are all the commands to fix the problem and test that it works, all together [with added spaces between the output of a command and any subsequent command]:

PS> choco source remove --name=ProGet
Chocolatey v0.10.8
Removed ProGet

PS> choco source add --name=ProGet --source="http://my-proget-server/nuget/Chocolatey"
Chocolatey v0.10.8
Added ProGet - http://my-proget-server/nuget/Chocolatey (Priority 0)

PS> choco source disable --name=chocolatey
Chocolatey v0.10.8
Nothing to change. Config already set.

PS> choco source list
Chocolatey v0.10.8
chocolatey [Disabled] - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
ProGet - http://my-proget-server/nuget/Chocolatey | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.

PS> choco search curl
Chocolatey v0.10.8
curl 7.56.1 [Approved]
Cmder 1.3.3 [Approved] Downloads cached for licensed users
cmdermini 1.3.3 [Approved] Downloads cached for licensed users
insomnia-rest-api-client 5.11.0 [Approved] Downloads cached for licensed users
rust 1.21.0 [Approved] Downloads cached for licensed users
git-lfx 0.1.0 [Approved]
jivkok.dev1 1.1.0.8 - Possibly broken
etcd 3.2.9 [Approved] Downloads cached for licensed users
tivotogo-plex 2016.12.30 [Approved] Downloads cached for licensed users
rust-ms 1.21.0 [Approved] Downloads cached for licensed users
mve 2016.05.17.00 [Approved] Downloads cached for licensed users
11 packages found.
Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93
  • 1
    I like that it is still showing the details in there. I take it this is a ProGet paid version? – ferventcoder Nov 10 '17 at 18:17
  • @ferventcoder I'm not sure what the licensing is exactly. It's an oldish version of ProGet, maybe older than the paid version being a thing. – Kenny Evitt Nov 10 '17 at 19:11