I know I can get the project through git clone
command, but is there any way, how to download the project through the web interface from BitBucket.org?
In the best way, I am looking for a way to download a project source as ZIP compress file.

- 17,550
- 18
- 67
- 85

- 46,344
- 73
- 224
- 412
-
after trying alot of download managers, use firefox download them all it gives you the maximum download speed , and dose not interrupt for no reason , on bitbucket i had tens of branches and its fast – shareef Oct 02 '16 at 15:09
-
1How to download a single file? – Jithin Pavithran Oct 27 '16 at 17:30
8 Answers
For the latest version of Bitbucket (2016+), the download link can be found in the Download menu item.
Pre-2016
First method
In the Overview page of the repo, there is a link to download the project.
Second method
Go to Downloads -> Branches -> Download the branch that you want (as .zip, .gz or .bz2). There you'll find download links for all tags. The links will be in the format:
https://bitbucket.org/owner/repository/get/v0.1.2.tar.gz
By tweaking it a little bit, you can also have access to any revision by changing the tag to the commit hash:
https://bitbucket.org/owner/repository/get/A0B1C2D.tar.gz
-
Is it possible to download a commit other than the most recent one? – Diego Herranz Apr 30 '13 at 14:48
-
2@DiegoHerranz You can't download all the commits but you can download also the tagged ones. – Pigueiras Apr 30 '13 at 15:56
-
20Despite having no button, you can actually download ANY commit, just use an url like this: ``https://bitbucket.org/owner/repository/get/A0B1C2D.tar.gz``, changing the owner, repository and revision hash. Check [this answer](http://stackoverflow.com/a/16930983/2257411) for more details. – Rudy Matela Jul 18 '13 at 13:06
-
@Rudy Really nice find! Could you edit my answer with that information? I would do it myself but I can't right now :) – Pigueiras Jul 18 '13 at 19:09
-
9
-
@RudyMatela and Pigueriras - this solution saved my bacon today. I had a commit that was in a bizarre branch that'd been deleted about a month ago. Luckily I had the SHA1 of the commit and was able to get it. You guys rock. – ScottMcGready Sep 07 '15 at 20:59
-
Thanks, this was exactly what I needed. I used this in lieu of cloning a repo and copying it to a new repo as I didn't need to preserve commit history. – MrWiLofDoom Dec 18 '18 at 17:10
-
Any way to customize the filename being proposed? The default {owner}-{reponame}-{commit}.zip doesn't suit my needs. Any way to limit to {reponame}.zip only? – DrLightman Nov 17 '19 at 21:11
Now Its Updated and very easy to download!
Select your repository from Dashboard or Repository tab.
And then just click on Download tab having icon of download. It will Let you download whole repository in zip format.

- 1
- 1

- 17,550
- 18
- 67
- 85
-
5I have to say that they updated the page and they removed the "Download" link from the main repository view. Someone should send them a link to this SO question ... – Pigueiras Dec 16 '14 at 16:26
-
Unfortunately, a straight-forward way to download an old revision is still missing in their UI. Still have to use second method mentioned in @Pigueiras [solution](http://stackoverflow.com/a/13044790/1369473). – Fr0zenFyr Sep 10 '15 at 07:25
-
What about a way to download all repos for a project? i.e. I would like a folder with the project name, with nested folders for each repo... – Zach Smith Feb 15 '18 at 08:30
-
1This should be the new accepted answer but I think the OP is no longer on SO – Jono Apr 14 '18 at 01:48
-
@ZachSmith you need to use their REST API to get a list of each repository and its clone URL, then clone each one. – simpleuser Aug 09 '18 at 17:43
For git repositories, to download the latest commit, you can use:
https://bitbucket.org/owner/repository/get/HEAD.zip
For mercurial repositories:

- 16,304
- 6
- 66
- 71
-
4This doesn't work. The way to do this is: https://bitbucket.org/owner/repository/get/tip.zip – iepathos Apr 28 '14 at 20:21
-
1It certainly works for me, I just tried it again. But perhaps yours is the documented way to do it? – seddonym Apr 29 '14 at 08:23
-
3I just tried again and bitbucket responds with 404 to the /get/HEAD.zip, but properly gives a download link for /get/tip.zip – iepathos May 01 '14 at 09:07
-
You're right - it did used to work but they've changed things over at Bitbucket. I've edited the answer. – seddonym Nov 15 '14 at 09:20
-
1actually it works for me with HEAD.zip. May it makes a difference if the repo is using git vs. hg? For git HEAD.zip works and I suspect tip.zip is the right thing for hg repos. – Felix Schwarz Nov 28 '14 at 16:12
In Bitbucket Server you can do a download by clicking on ...
next to the branch and then Download
For more info see Download an archive from Bitbucket Server

- 3,978
- 1
- 39
- 36
-
I don't see the "download" item in the menu. Is there a way to add/active it? – Tohid Aug 09 '17 at 15:32
-
1You probably have an older version of Bitbucket Server. We have 5.1.0 and it is working there. – MonkeyDreamzzz Aug 10 '17 at 10:29
-
Direct download:
Go to the project repository from the dashboard of bitbucket. Select downloads from the left menu. Choose Download repository.

- 197
- 1
- 12

- 14,148
- 92
- 64
-
Particularly noteworthy in my opinion is the "Tags" tab. This contains the zip/gz/bz2 links which point to specific tags. Useful when added a package to PyPI, for example. – rooms Oct 17 '17 at 19:58
To Download Specific Branch - Go To Downloads from Left panel, Select Branches on Downloads page. It will list all Branches available. Download your desired branch in zip, gz, or bz2 format.

- 1,334
- 18
- 21
I was trying to figure out if it's possible to browse the code of an earlier commit like you can on GitHub and it brought me here. I used the information I found here, and after fiddling around with the urls, I actually found a way to browse code of old commits as well. Even though the question/answer is about downloading the code of an earlier commit, I thought I'd just add an answer for browsing the code also.
When you're browsing your code the URL is something like:
https://bitbucket.org/user/repo/src/
and by adding a commit hash at the end like this:
https://bitbucket.org/user/repo/src/a0328cb
You can browse the code at the point of that commit. I don't understand why there's no dropdown box for choosing a commit directly, the feature is already there. Strange.

- 6,885
- 2
- 31
- 43
In case you want to download the repo from your shell/terminal it should work like this:
wget https://user:password@bitbucket.org/user-name/repo-name/get/master.tar.bz2
or whatever download URL you might have.
Please make sure the user:password are both URL-encoded. So for instance if your username contains the @
symbol then replace it with %40
.

- 3,553
- 2
- 32
- 29