Hello, I’m trying to download from repository full archive.
i just upgraded to newest version, and earlier it was going by:
curl --header "PRIVATE-TOKEN: <my_private_token>" https://gitlab.mydomain.com/project/-/archive/staging/project-staging.tar.gz -o path/to/save_file
After upgrade it don’t work, I found why, and I know I have to use API to do this. But my problem is I don’t know how to download a specific branch archive.
I’m trying this:
curl --header "PRIVATE-TOKEN: <my_private_token>" https://gitlab.mydomain.com/api/v4/projects/<my_procejct_ID>/repository/archive.tar.gz? -o path/to/save_file
But it don’t download a branch which i want. In documentation i see i can add sha parameter, but it takes a specific commit, not branch.
So how to download always last commit from a specific branch.