You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.