Martin Drozdik
Martin Drozdik

Reputation: 13323

How to set up ssh communication with Bitbucket using Mercurial?

I am following this tutorial on establishing the ssh communication.

Everything goes fine until I get to:

Step 7. Change your repo from HTTPS to the SSH protocol

enter image description here

I have no idea what the first step means. I have no .hg folder and if I create one using hg init, there is no hgrc file in it.

I came to a new location and I want to clone repositories from Bitbucket using ssh to start working.

Also I have no idea what is meant by myquotefork. It does not appear in the previous text.

Upvotes: 0

Views: 122

Answers (1)

Julian
Julian

Reputation: 20324

If you simply just want to clone an existing repository from Bitbucket using SSH instead of HTTPS, that is quite simple. From the command line on your local computer (where you want the repository cloned to), write the following command:

hg clone ssh://[email protected]/claims/nodatime

You will now have the repository cloned to the nodatime folder. And inside the nodatime folder, you should also have a .hg folder containing a hgrc file with the content described in point 3 in your question.

I haven't read the tutorial you're following, but point 1 expects that you've already cloned an existing repository. The .hg folder is created when you initialize/clone a repository. The hgrc file inside this folder is however only created when you clone an existing repo (and not when you just initialize one), which is probably why you didn't see it.

Upvotes: 1

Related Questions