Is it possible to get raw files at BitBucket?

it is easy to get plain text of any file using curl.

curl --user userName https://FQDN/repo_name/raw/fileName -o fileName

for example: URL for the target page in bitbucket: https://bitbucket.myDomain.com/projects/repos/repo/browse/myFile

will end with the following curl request: curl --user username https://bitbucket.myDomain.com/projects/repos/repo/raw/myFile -o targetFile


Yes. https://bitbucket.org/<account>/<repo-name>/raw/<commit-sha-or-HEAD>/<filename>

For this repo: https://bitbucket.org/pedrorijo91/hello-slick/src

Choose a a file (LICENSE for instance): https://bitbucket.org/pedrorijo91/hello-slick/src/fe7cfe392d8090fececdf481ba3a9270bbe678dd/LICENSE?fileviewer=file-view-default

and now click on the RAW button: https://bitbucket.org/pedrorijo91/hello-slick/raw/fe7cfe392d8090fececdf481ba3a9270bbe678dd/LICENSE

It seems bitbucket always adds a SHA before the file. You can specify the commit or HEAD seems to work also: https://bitbucket.org/pedrorijo91/hello-slick/raw/HEAD/LICENSE