I would like to add some automation to our build process, and I'm curious if it's possible to use an SSH access key to download a specific tag (or commit, or branch, etc.) in our repo?
I realize that in the Bitbucket web GUI, I'm able to go to Downloads from the repository's page, choose the tag that I want and download either a .zip, .tar.gz or .bz2 archive of the source code; but I'd like to do this via software using SSH.
I know that I could use HTTPS with a URL-encoded username and password (e.g. https://user:password@bitbucket.org/user-name/repo-name/get/master.tar.gz ) to download the tag, but that would require me to put a user's username and password into our code, which isn't ideal. It's also not ideal to clone the whole repo and checkout the tag I need, since the whole repo may be significantly larger than just a single snapshot of the source code.
Is it possible to do this?