# Download a specific repo branch with curl or similar

**URL:** <https://forum.gitea.com/t/download-a-specific-repo-branch-with-curl-or-similar/5462>\
**Category:** Gitea Usages\
**Created:** [July 8, 2022, 12:58am UTC](https://forum.gitea.com/t/download-a-specific-repo-branch-with-curl-or-similar/5462 "2022-07-08T00:58:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfgratton](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jfgratton](https://forum.gitea.com/u/jfgratton)\
**Post date:** [July 8, 2022, 12:58am UTC](https://forum.gitea.com/t/download-a-specific-repo-branch-with-curl-or-similar/5462/1 "2022-07-08T00:58:34Z")

</div>

Hi,

I’m trying to automate APK (Alpine) packages building according to [Creating an Alpine package - Alpine Linux](https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package) and some HOWTO at [how to download archive of private repository? · Issue #9224 · go-gitea/gitea · GitHub](https://github.com/go-gitea/gitea/issues/9224)

What I see there is that you need to curl -X GET the master branch, and it compresses as .zip

Is there an API way to download a specific repo branch, in tar.gz ? I might have missed it in the doc, for some reason. I need to download the branch under a specific user which has its own auth token in gitea.

Also, I forgot: the gitea user might not be the same as the unix user (gitea user has its own auth token registered in the gitea server)
