git 如何克隆一个 bitbucket 存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34996271/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to clone a bitbucket repository?
提问by The user with no hat
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?
一段时间后重新开始工作,我似乎不知道如何克隆一个 bitbucket 存储库。知道为什么我收到“未找到”错误吗?
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
回答by Chris
This is a Mercurialrepository, not a Git repository. Bitbucket supports both systems.
这是一个Mercurial存储库,而不是 Git 存储库。Bitbucket 支持两种系统。
Clone with:
克隆:
hg clone https://bitbucket.org/helllamer/mod_openid
For more information about Mercurial please see its Wikipedia page.
有关 Mercurial 的更多信息,请参阅其 Wikipedia 页面。
回答by Ron Lavit
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 .
在 bitbucket 屏幕的左侧有一个带有按钮的垂直列。顶部的第二个按钮是“克隆”按钮。按此按钮。您将获得 HTTP 地址。
Copy this address and use in git in regular way :
复制此地址并以常规方式在 git 中使用:
git clone <HTTP address of repo>
git clone <HTTP address of repo>
回答by Kasumi Gunasekara
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:
它很简单,与 GitHub 中的相同。从浏览器转到 Bitbucket 存储库并复制 url。在想要克隆存储库的所需位置打开一个终端,然后键入:
git clone <copied url of repo.>
Then it ask your Bitbucket username and password. After providing them, you can clone it.
然后它会询问您的 Bitbucket 用户名和密码。提供它们后,您可以克隆它。
回答by Droid
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.
充其量你只需要简单地下载,如果你不是 cmd 类型,你可以使用 sourcetree 或使用 Mercurial 来享受克隆。
回答by Sajib Acharya
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.
很可能它是一个私有存储库,您拥有访问权限而我没有。您需要做的是将鼠标移到顶部左侧窗格的三个点上(请参阅图像),然后您会看到一个弹出窗口,您可以在其中找到克隆选项。点击它,你会得到一个命令hg clone bitbucket-url
(如 Chris 提到的,这是一个 Mercurial 存储库)。复制它并将其粘贴到您的终端上。如果您有权访问存储库,您将能够克隆它。
回答by Pabitra Dash
The following works for me for Mercurial repository.
以下适用于我的 Mercurial 存储库。
hg clone https://[YourUserName]@bitbucket.org/tr_radlab/radlab-for-windows/branch/default
Put your user name in place of [YourUserName] in above Url.
将您的用户名替换为上述 Url 中的 [YourUserName]。