Generic Packages Repository, put multiple files in the same package/version #9711

Closed
opened 2025-11-02 08:47:18 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @danielezelante on GitHub (Oct 19, 2022).

Description

I tried to publish a package version and upload a file as shown in:
https://docs.gitea.io/en-us/packages/generic/
PUT https://gitea.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name}

When I upload the first file using curl in the new package/version, all is right, but when I try to upload another file (with a different name) to the same package/version, I got this error: 400 Bad Request

On server, gitea.log contains:
2022/10/19 23:00:57 ...packages/packages.go:159:createPackageAndVersion() [E] [63506587-2] Error inserting package: Package version already exists
2022/10/19 23:00:57 ...ges/helper/helper.go:32:LogAndProcessError() [D] [63506587-2] Package version already exists

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.31.1

Operating System

RHEL9

How are you running Gitea?

systemd https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64

Database

PostgreSQL

Originally created by @danielezelante on GitHub (Oct 19, 2022). ### Description I tried to publish a package version and upload a file as shown in: https://docs.gitea.io/en-us/packages/generic/ PUT https://gitea.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name} When I upload the first file using curl in the new package/version, all is right, but when I try to upload another file (with a different name) to the same package/version, I got this error: 400 Bad Request On server, gitea.log contains: 2022/10/19 23:00:57 ...packages/packages.go:159:createPackageAndVersion() [E] [63506587-2] Error inserting package: Package version already exists 2022/10/19 23:00:57 ...ges/helper/helper.go:32:LogAndProcessError() [D] [63506587-2] Package version already exists ### Gitea Version 1.17.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.31.1 ### Operating System RHEL9 ### How are you running Gitea? systemd https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64 ### Database PostgreSQL
GiteaMirror added the topic/packages label 2025-11-02 08:47:18 -06:00
Author
Owner

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

Support for multiple files in a single generic package/version was added in #20661 and is only available with Gitea 1.18. Unfortunately our docs are not versioned at the moment.

@KN4CK3R commented on GitHub (Oct 20, 2022): Support for multiple files in a single generic package/version was added in #20661 and is only available with Gitea 1.18. Unfortunately our docs are not versioned at the moment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9711