从 BitBucket 下载 Git 存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10907863/
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
Download a Git repo from BitBucket
提问by Rajeshwar
I just download Git bash and now I want to download a repository from Bitbucket. I have the username and password.
我只是下载 Git bash,现在我想从 Bitbucket 下载一个存储库。我有用户名和密码。
When I try:
当我尝试:
$ git clone https://[email protected]/xxxx/xxxxx.git
I get:
我得到:
Cloning into 'xxxx'...
fatal:https://[email protected]/xxxx/xxxxx/info/refs not found did you git
update server-info on the server ?
回答by MoxieandMore
When you create a repository in bitbucket, the user interface displays the exact clone command you need for you:
在 bitbucket 中创建存储库时,用户界面会显示您需要的确切克隆命令:
So, your clone command would need to be:
因此,您的克隆命令需要是:
https://usersname@bitbucket.org/username/reponame.git
https://开头usersname@ bitbucket.org /用户名/reponame.git
回答by aufumy
you can also use ssh to clone, this allows for the setup of passwordless push and pulling, with the use of ssh keys.
您还可以使用 ssh 进行克隆,这允许使用 ssh 密钥设置无密码推和拉。
git clone [email protected]:username/reponame.git
git clone [email protected]:username/reponame.git
回答by schmijos
Bitbucketmay use Mercurial. Are you really cloning a gitrepository? I solved the same problem by cloning with hg;-)
Bitbucket可以使用Mercurial。你真的在克隆一个git仓库吗?我通过使用hg进行克隆解决了同样的问题;-)
回答by Bharat
the interface on bitbucket has changed, so people looking for the right command can find it on the left hand side under "Actions"->"Clone" and you'll see the command already coded for https. It works.
bitbucket 上的界面已更改,因此寻找正确命令的人可以在左侧的“操作”->“克隆”下找到它,您将看到该命令已为 https 编码。有用。