How to clone a bitbucket repository?
Solution 1
This is a Mercurial repository, not a Git repository. Bitbucket supports both systems.
Clone with:
hg clone https://bitbucket.org/helllamer/mod_openid
For more information about Mercurial please see its Wikipedia page.
Solution 2
On the left side of bitbucket screen there is a vertical column with buttons. The second button from the top is "CLONE" button . Press on this button .You will get HTTP address .
Copy this address and use in git in regular way :
git clone <HTTP address of repo>
Solution 3
It is simple and same as in GitHub. Go to Bitbucket repository from your browser and copy url. Open a terminal in desired location, where you want to clone the repository, and then type this:
git clone <copied url of repo.>
Then it ask your Bitbucket username and password. After providing them, you can clone it.
Related videos on Youtube
Comments
-
The user with no hat almost 2 years
Getting back to work after a while it seems I don't know how to clone a bitbucket repository. Any idea why I get the "not found" error?
git clone --verbose https://bitbucket.org/helllamer/mod_openid Cloning into 'mod_openid'... remote: Not Found fatal: repository 'https://bitbucket.org/helllamer/mod_openid/' not found
System:
git version 1.9.1 uname -a Linux openvpnas2 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
-
Sajib Acharya over 8 yearsGo to the bitbucket repository that you want to clone, on the left pane, there is a
clone
option. Clicking that will give you a link to the repository. Copy that and trygit clone url-from-bitbucket
. This should work! -
The user with no hat over 8 years@SajibAcharya I'm sorry but there is no "clone" option. The only url I could find is "bitbucket.org/helllamer/mod_openid" . Let me know if you find otherwise.
-
Sajib Acharya over 8 yearswhere did you get this url from? It says 404 when I click it. Moreover, bitbucket clone urls do not look like the one you posted. It kind of looks like
https://username@bitbucket/path/to/project
. You sure you are using the right url? -
Sajib Acharya over 8 yearsPlus, if it is a git repo, it should have a
.git
in the end. You URL is malformed. -
The user with no hat over 8 yearsIt has no .git extension. I found the repository on the bitbucket website... I don't get why you can't reach it. Here is a printscreen with the URL of the repo i.imgur.com/1H5poUy.png
-
Sajib Acharya over 8 years...and then there are people who downvotes a question without giving any specific reason -_-
-
Jeremy about 5 yearsthe bitbucket documentation is totally unhelpful here. But guesswork (helped by the above answers, and experience with github) enabled me to clone the repository I wanted, which is bitbucket.org/amintimany/categories the command was git clone bitbucket.org/amintimany/categories.git contrary to the answers above, I saw no clone button or clone option, and nothing like the screenshot shown above. And contrary to the bitbucket documentation there is no + symbol to click on
-
-
The user with no hat over 8 yearsThanks @Chris! I've just found that few seconds ago... It's worth to mention that the UI is not that helpful .
-
Chris over 8 yearsAgreed! It took me a few minutes to figure this out as well.
-
Sajib Acharya over 8 yearsOn bigger screens it gives a full blown descriptive side panel, unlike on browsers in small screens.
-
Chris over 8 years@SajibAcharya, I assure you that I'm using a very big screen. The side panel doesn't seem to include any information about which version control system this repository uses. The only place I see it is as part of the SSH clone URLs.
-
Sajib Acharya over 8 yearsI am using a 15.6' screen with Firefox on Ubuntu. I get the bitbucket website like this. i.imgur.com/YNFqwxF.png
-
Chris over 8 years@SajibAcharya, where in that screenshot do you see an indication that we're dealing with a Mercurial repository?
-
Sajib Acharya over 8 years@Chris, I was indicating about the cloning option that the website provides, not the type of repository. But if you click on clone, it does show the
hg clone ...
command from which we could get an idea. -
Reza over 4 yearsThe bitbucket idea is: hiding it somewhere that people can't find it easily