Hello,
I would like to get a ZIP-file for a tag from my private repository via access token.
I manage to get the zip-file via App-password, but I don't want to share an App-password where the App-password gives acccess to all my repositories.
I use this URL to get the ZIP-file: https://bitbucket.org/{username}/{repository}/get/{tagname}.zip
Any suggestions on how I can accomplish this with access token created in the current repository?
Hi @Nitea and welcome to the community!
I'm afraid that we do not support downloading archives with a repository access token at the moment.
I went ahead and created a feature request in our issue tracker:
I would suggest adding your vote (by selecting the Vote for this issue link) and a comment there to further express your interest. You can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
In the meantime, until this gets implemented, a way to achieve what you want without exposing your app password would be to use a git clone command as follows
git clone --depth 1 --branch <branch_or_tag> https://x-token-auth@bitbucket.org/<workspace-id>/<repo-slug>.git
<branch_or_tag> can be either a branch or a tag name
--depth 1 will clone only one commit and it is an optional argument. If you only need the source code files, I assume there is no need to clone the whole history.
You can then navigate to the clone directory and delete the .git folder if you don't need a repo, but only the source code files.
Kind regards,
Theodora
Hello!
Thank you!
I made a bridge between My APP and Bitbucket where i handle unique tokens and then the bridge make the call via Username and App password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome @Nitea and thank you for sharing your solution here.
Please feel free to reach out if you ever need anything else!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.