API: get deb (or rpm) package from url #12014

Open
opened 2025-11-02 09:54:38 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @don-rumata on GitHub (Nov 14, 2023).

Feature Description

Hi!

Can you add downloading packages from an external web server?

How I publish packages now:

curl --verbose --user <my-user>:<my-password> --upload-file /local/path/to/file.deb \
http://<my-gitea-server>/api/packages/debian/pool/<distribution>/<component>/upload

How I want to (non-final version):


curl -X POST http://<my-gitea-server>/api/packages/debian/pool/<distribution>/<component>/upload \
   -H 'Content-Type: application/json' \
   -d '[
        {
          "url": "http://example.com/package.deb",
          "user": "admin",
          "password": "qazwsxedc"
        },
        {
          "url": "http://example.org/apt/package.deb",
          "token": "qazwsxedcqazwsxedcqazwsxedc"
        },
        {
          "url": "http://example.me/deb/package.deb"
        }
      ]'

Screenshots

No response

Originally created by @don-rumata on GitHub (Nov 14, 2023). ### Feature Description Hi! Can you add downloading packages from an external web server? How I publish packages now: ```bash curl --verbose --user <my-user>:<my-password> --upload-file /local/path/to/file.deb \ http://<my-gitea-server>/api/packages/debian/pool/<distribution>/<component>/upload ``` How I want to (non-final version): ```bash curl -X POST http://<my-gitea-server>/api/packages/debian/pool/<distribution>/<component>/upload \ -H 'Content-Type: application/json' \ -d '[ { "url": "http://example.com/package.deb", "user": "admin", "password": "qazwsxedc" }, { "url": "http://example.org/apt/package.deb", "token": "qazwsxedcqazwsxedcqazwsxedc" }, { "url": "http://example.me/deb/package.deb" } ]' ``` ### Screenshots _No response_
GiteaMirror added the topic/apitype/proposal labels 2025-11-02 09:54:38 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12014