Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download a Git repo from BitBucket

I just download Git bash and now I want to download a repository from Bitbucket. I have the username and password.

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 ?
like image 694
Rajeshwar Avatar asked Jun 06 '12 03:06

Rajeshwar


People also ask

How do I download a git repository?

Copy Repo URL Start from the github.com interface: Navigate to the repo that you want to clone (copy) to your computer -- this should be YOUR-USER-NAME/DI-NEON-participants . Click on the Clone or Download dropdown button and copy the URL of the repo.

How do I clone a repository from Bitbucket to local folder?

Clone a Bitbucket repository Click + in the global sidebar on the left, and under Get to work select Clone this repository. Select HTTPS from the menu in the upper-right (unless you've already set up your SSH keys). Copy the clone command.


4 Answers

When you create a repository in bitbucket, the user interface displays the exact clone command you need for you:

capture of clone help

So, your clone command would need to be:

https://usersname@bitbucket.org/username/reponame.git

like image 169
MoxieandMore Avatar answered Oct 03 '22 11:10

MoxieandMore


you can also use ssh to clone, this allows for the setup of passwordless push and pulling, with the use of ssh keys.

git clone [email protected]:username/reponame.git

like image 33
aufumy Avatar answered Oct 03 '22 12:10

aufumy


Bitbucket may use Mercurial. Are you really cloning a git repository? I solved the same problem by cloning with hg ;-)

like image 43
schmijos Avatar answered Oct 03 '22 10:10

schmijos


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.

like image 21
Bharat Avatar answered Oct 03 '22 11:10

Bharat