Support for Chocolatey/NuGet v2 in packages #9631

Closed
opened 2025-11-02 08:44:57 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @Jamie96ITS on GitHub (Sep 28, 2022).

Feature Description

I'd like to suggest an addition to the Packages feature...Chocolatey packages. As an API reference, this would require NuGet v2 support(I understand there are some enhancements for a full-featured Chocolatey repo but NuGet v2 is the base). Additionally, this would change up the package view page with references to chocolatey commands, e.g. choco push and choco install instead of the dotnet NuGet commands. I personally would try to put choco:// links on the page but that protocol is unofficial.

While Chocolatey will eventually upgrade to support NuGet V3, and technically you could use Gitea's NuGet API as a repo at that point, there is no set date on that upgrade and the pages would reference dotnet commands.

Thoughts?

Screenshots

No response

Originally created by @Jamie96ITS on GitHub (Sep 28, 2022). ### Feature Description I'd like to suggest an addition to the Packages feature...[Chocolatey ](https://chocolatey.org/) packages. As an API reference, this would require NuGet v2 support(I understand there are some enhancements for a full-featured Chocolatey repo but NuGet v2 is the base). Additionally, this would change up the package view page with references to chocolatey commands, e.g. `choco push` and `choco install` instead of the `dotnet` NuGet commands. I personally would try to put [choco:// links](https://community.chocolatey.org/packages/choco-protocol-support) on the page but that protocol is unofficial. While Chocolatey will eventually upgrade to support NuGet V3, and technically you could use Gitea's NuGet API as a repo at that point, there is no set date on that upgrade and the pages would reference `dotnet` commands. Thoughts? ### Screenshots _No response_
GiteaMirror added the topic/packagestype/proposaltype/feature labels 2025-11-02 08:44:57 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Oct 7, 2022):

I did not test it but can't you just use the NuGet registry as a Chocolatey registry?

@KN4CK3R commented on GitHub (Oct 7, 2022): I did not test it but can't you just use the NuGet registry as a Chocolatey registry?
Author
Owner

@Jamie96ITS commented on GitHub (Oct 7, 2022):

I did not test it but can't you just use the NuGet registry as a Chocolatey registry?

Unfortunately you cannot. While you can apparently still Push packages to the registry if you drop the index.json from the API, use of the API on the client side to query and pull packages does not work. I believe this is because Gitea only supports v3 of the NuGet API? Chocolatey does not support that yet™️. It is a major overhaul for Chocolatey that has been in the works for some time now and may be quite a while longer to be finished. I’m on mobile now and will edit this/respond later to reference the open issue there. See Choco 1697 and Choco 508

So for Chocolatey, we would need the v2 version of the NuGet API, which I understand is quite old and deprecated on the NuGet side of things. Hence it would make sense to leave NuGet alone and consider it as a Chocolatey API, especially if it were ever to include any of their “enhancements”. Though I don't think those are strictly necessary, if someone were to figure them out, they don't belong with vanilla NuGet.

@Jamie96ITS commented on GitHub (Oct 7, 2022): > I did not test it but can't you just use the NuGet registry as a Chocolatey registry? Unfortunately you cannot. While you can apparently still `Push` packages to the registry if you drop the index.json from the API, use of the API on the client side to query and pull packages does not work. I believe this is because Gitea only supports v3 of the NuGet API? Chocolatey does not support that yet™️. It is a major overhaul for Chocolatey that has been in the works for some time now and may be quite a while longer to be finished. <del>I’m on mobile now and will edit this/respond later to reference the open issue there. </del>See [Choco 1697](https://github.com/chocolatey/choco/issues/1697) and [Choco 508](https://github.com/chocolatey/choco/issues/508) So for Chocolatey, we would need the v2 version of the NuGet API, which I understand is quite old and deprecated on the NuGet side of things. Hence it would make sense to leave NuGet alone and consider it as a Chocolatey API, especially if it were ever to include any of their “enhancements”. Though I don't think those are strictly necessary, if someone were to figure them out, they don't belong with vanilla NuGet.
Author
Owner

@KN4CK3R commented on GitHub (Oct 7, 2022):

Ah, missed that they only support v2, thanks. I will have a look at the v2 api spec.

@KN4CK3R commented on GitHub (Oct 7, 2022): Ah, missed that they only support v2, thanks. I will have a look at the v2 api spec.
Author
Owner

@KN4CK3R commented on GitHub (Oct 10, 2022):

I have added #21393. Could you test this PR?

@KN4CK3R commented on GitHub (Oct 10, 2022): I have added #21393. Could you test this PR?
Author
Owner

@Jamie96ITS commented on GitHub (Oct 12, 2022):

So far so good! It works for everything I use it for. I can push, list, info, and install without complaint.

@Jamie96ITS commented on GitHub (Oct 12, 2022): So far so good! It works for everything I use it for. I can push, list, info, and install without complaint.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9631