一段时间后,当我回到工作中时,我似乎不知道如何克隆一个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
系统:
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
8条答案
按热度按时间jmp7cifd1#
在bitbucket屏幕的左侧有一个带按钮的垂直列。从顶部数第二个按钮是“克隆”按钮。按下此按钮。您将获得HTTP地址。
复制此地址并在git中以常规方式使用:
git clone <HTTP address of repo>
mspsb9vt2#
这是一个 Mercurial 存储库,不是Git存储库。Bitbucket supports both systems。
克隆:
有关Mercurial的详细信息,请参阅its Wikipedia page。
lbsnaicq3#
它很简单,和GitHub中的一样。从你的浏览器进入Bitbucket仓库并复制url。在你想要克隆仓库的位置打开一个终端,然后输入:
然后它会询问你的Bitbucket用户名和密码。提供后,你就可以克隆它了。
hrysbysz4#
很可能是一个私有存储库,您有访问权限,而我没有。您需要做的是将鼠标移动到左侧窗格顶部的三个点上(请参阅图片),然后您会看到一个弹出窗口,在其中可以找到克隆选项。单击该选项,您会看到类似
hg clone bitbucket-url
的命令(正如Chris提到的,这是一个Mercurial存储库)。复制并粘贴到您的终端上。如果您有权限访问存储库,您将能够克隆它。xxhby3vn5#
下面的代码适用于Mercurial存储库。
将您的用户名替换为上述URL中的[YourUserName]。
pxiryf3j6#
最好的情况下,您只需要简单地下载,这样您就可以使用sourcetree或使用Mercurial来享受克隆,如果您不是cmd类型的话。
plupiseo7#
要使用HTTPS克隆存储库,首先您应该生成一个访问令牌(您不能再使用登录密码),然后使用此生成的令牌克隆存储库。
生成访问令牌:
个人设置〉应用密码〉创建应用密码
克隆存储库:
它将提示您输入生成的令牌。
tvmytwxo8#