curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Download ZIP file of private gitea repository

From: Alex Bligh via curl-users <curl-users_at_lists.haxx.se>
Date: Sat, 3 Sep 2022 20:06:46 +0200

> On 3 Sep 2022, at 20:03, Dan Fandrich via curl-users <curl-users_at_lists.haxx.se> wrote:
>
>> How to download the ZIP file with curl?
>
> It depends on what the error is. I suspect that the site isn't using
> HTTP authentication (which is what the --user option is for) but is
> using a custom authentication scheme using cookies. Take a look at
> https://curl.se/docs/httpscripting.html especially the Web Login section
> for some hints on how to script such a login.

gitea appears to have an API:
  https://docs.gitea.io/en-us/api-usage/

A 5 second skim suggests you can use basic auth, but only to get a
token. The API documentation has examples with curl. Perhaps better
to use the API than scrape the website.

-- 
Alex Bligh
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-09-03