How to clone a bitbucket repository?

烈酒焚心 提交于 2020-12-28 13:12:19

问题


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

回答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.




回答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>




回答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.




回答4:


Most probably it is a private repository where you have access permissions and I do not. What you need to do is move your mouse on the three dots on the left pane at the top (refer the image) and then you'd get a pop up where you'd find the clone option. Click on that and you'd get a command like hg clone bitbucket-url (It is a Mercurial repository as mentioned by Chris). Copy that and paste it on your terminal. You'll be able to clone that if you have permissions to access the repository.




回答5:


The following works for me for Mercurial repository.

hg clone https://[YourUserName]@bitbucket.org/tr_radlab/radlab-for-windows/branch/default

Put your user name in place of [YourUserName] in above Url.




回答6:


At best you need to simply download so you could either use sourcetree or use Mercurial to enjoy cloning if you are not the cmd type.



来源:https://stackoverflow.com/questions/34996271/how-to-clone-a-bitbucket-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!