cURL Download latest release from github private repository

Viewed 738

I'm trying to download the latest release from a GitHub private repository. I succeeded but not the way I want it. I can download it but inside I found a folder name with my username and my latest commit id. I would like to have a different name for that folder.

I am downloading the latest release zipball: "zipball_url": "https://api.github.com/repos/:user/:repo/zipball/v1.0.1"

I saw that I can attach binary files to a release.

Now if I do:

curl -H "Authorization: token :token" https://api.github.com/repos/:user/:repo/releases/latest

I can see a a browser_download_url file:

"browser_download_url": "https://github.com/:user/:repo/releases/download/:release/file.zip"

Is there a way to do a cURL and download this file? It doesn't work the same as the above one.

Or is there a way to rename a folder inside my zip file?

0 Answers
Related