How can I clone a repo with my username and private key??

pguardiario
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2019

My client sent me this link:

https://ghar1@bitbucket.org/ghar1/api-request-server.git

How do I clone it with my username (pguardiario) and private key

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2019

Welcome to the Community!

The steps for cloning a repository can be found at Clone a repository. In your case, you'll need to type the following in your teminal:

git clone https://ghar1@bitbucket.org/ghar1/api-request-server.git

Keep in mind that if the repository is not public, you'll need to have permissions to access that repository to be able to clone it.

I hope that helps you! If you need further assistance, let us know :) 

Best regards,

Ana

pguardiario
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2019

Hi Ana,

Thanks for the reply.

When I do that it asks me for a password rather than using my private key which I have already set up with bitbucket.

I expected to be able to:

git clone pguardiario@bitbucket.org:/ghar1/api-request-server.git

but this gives errors. Please advise.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2019

Hi @pguardiario ,

I believe @Ana mistakenly pasted the wrong command from the documentation page she pointed to. Indeed, while she linked the correct documentation page, the provided command for is cloning over HTTPS instead of SSH. 

The command to clone over SSH, as explained in the Clone a repository page, is:

 git clone ssh://git@bitbucket.org:ghar1/api-request-server.git

 

Also, please notice that if you have access to the repository (that is required in order to be able to clone it), you can get the url to clone the repository by going to "Source" and clicking on the Clone button on the top right corner.

See below picture for details:

Clone-Repository.jpg

 

Let me know if this helps or if you have further questions on this topic.

 

Cheers,
Dario 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events