Link to compressed file

I’ve noticed that one developer has a separate block named so when you click there, it actually downloads a “.tar.gz” file. The link to subdirectory ‘tarball’ is not accessible so I cannot even navigate from to the compressed file. Which would be the procedure to accomplish this? Thanks.

Hey there @afernandezody and welcome to the GitHub Community!

I am not sure I understand your question very well. You’d like to have a button/link in the user interface to get the tarball? Such a link doesn’t exist for as far as I know, but you can get a ZIP if you are on the homepage of a repository and click the green Code button, then click Download ZIP.

Hi @mpboom,
Thanks. That is not exactly the goal. Let me rephrase the question a little bit. Let’s say that I have a file ‘example.tar.gz’ that I created using gzip or something else. I want to upload the file as so that anyone using a web browser and typing that address will download the gzipped file. Just for clarification, GitHub - afernandezody/benchompi is an actual thing but there is no tarball subdirectory in it (or maybe it’s simply hidden). That is how it is set up by the developer, and it’s what I’m trying to figure out how to do myself.

Hey @afernandezody ! Sorry for my late reply. I think it’s a legacy feature of GitHub (judging from the word legacy in the URL after redirection). I’d therefore recommend not to become too dependent on the feature, in case it gets removed.

It appears the URL format is:<<USER>>/<<REPO>/tarball/<<BRANCH NAME>>

to obtain a tarball archive of the branch specified in the URL.

I don’t think you have much flexibility in changing this.

You could also consider publishing your tarball as a release artifact instead and offer the download from there.