I need help, can anyone help me?

I have a private project and have released a tag of v1.0.0. Now I want to download the tar.gz compressed file of this tag using curl. Can you please tell me how to write the curl command for this? I have already created a token for authentication, but it doesn’t seem to work.

curl -H “Authorization: token <token>” -L -o tag.tar.gz<tar.gz-archive-url>

I think using the API to download the archive would be better. I’m not sure that the templated pages work with the Authorization header.

Here’s an example using the latest repo I saw on try.gitea.io (see API docs):

curl -X 'GET' \
  'https://try.gitea.io/api/v1/repos/petrus7/mailctl/archive/main.tar.gz' \
  -H 'Authorization: token your_token_here' \
  -o tag.tar.gz

This will download the archive for petrus7’s mailctl repo targeting the main branch. You should be able to replace main with a tag name like v1.0.0.