Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for acting like a Chocolatey server #294

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jgagnaire
Copy link

Cherry-picked Mizipzor's contributions from unmerged PR, and added support for 'choco install' command

Original description:

Added support for acting like a Chocolatey server.

This includes rudimentary support for api v2 and OData.
Lifted a lot of the core logic from https://github.com/ai-traders/BaGet.
Created Legacy namespace and tried to keep everything contained, would
prefer if Choco added nuget api v3 support.

Closes Issue(s)

#43

At least partially, OData queries can be very expressive, I dont know to what extent old nuget clients use it.

Motivation

Need it, and want to reuse the same server software between nuget and choco.

alexanderfast and others added 3 commits July 10, 2019 09:02
This includes rudimentary support for api v2 and OData.
Lifted a lot of the core logic from https://github.com/ai-traders/BaGet.
Created Legacy namespace and tried to keep everything contained, would
prefer if Choco added nuget api v3 support.
@rbicker
Copy link

rbicker commented Jan 28, 2020

Hi @jgagnaire
Thanks for your work! I wanted to test your branch but could not get it to work. Sorry if I am being stupid here but I cannot figure out which url to use as source for the choco command (-s param)?
I tried /v3/index.json, /v2/, all the new paths listed in the index.json... but it does not seem to work for me.
Thanks

@jgagnaire
Copy link
Author

jgagnaire commented Jan 28, 2020

Hi @rbicker ! I was using this patch with the following command:
choco install chocolatey --source "https://your.repo.url/v2" -y --force
Hope it helps :)

EDIT:
It has been a while now, but if I remember correctly, it will not work if the URL has a trailing slash "/v2/" - it should instead end with "/v2" only

@jadestorm
Copy link

Hi @jgagnaire this is great! I'm aiming to shut down my current chocolatey server in lieu of something I can run on Linux and BaGet was really simple to set up and well looks nice =) However I then ran into it not working with chocolatey. I am not using your patch in production and it's working very well. So long story short, @loic-sharma this appears to be a great start!

What all other support would this theoretically need? list/search? perhaps some form of update unless that is basically handled by list/search. I wouldn't necessary bother with push as it's trivial to use the v3 api tools to handle a push with a separate tool. chocolatey integrates really well with Puppet for us though so I need it for that functionality.

Anyway, I really just wanted to say thumbs up, this is working well. =D

@jp1337 jp1337 mentioned this pull request Jul 22, 2020
@samhocevar
Copy link

If anyone’s using this patch, master has diverged a lot and this PR no longer merges cleanly, so I merged @jgagnaire’s branch here: https://github.com/loic-sharma/BaGet/compare/master...samhocevar:feature/apiv2?expand=1

@gep13
Copy link

gep13 commented Apr 24, 2023

We, the Chocolatey Team, are currently working on a new release of Chocolatey, which will include support for the NuGet V3 specification. This is currently available in a beta format, and it should allow you to use Baget and Chocolatey together. If anyone is interested in this, it would be great if you could take the beta for a spin, and let us know any feedback. Feedback can be provided here:

chocolatey/choco#2995

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants