Overview
Mercurial, Git, and TortoiseHg operations (e.g., clone
, pull
, and push
) can use either the SSH or HTTP(S) server address.
If you have already configured SSH, you can find the SSH/HTTP toggle in the upper-right corner of a repository screen. It provides the exact Clone URL for TortoiseHg and Git for HTTP or SSH.
This article describes the steps you need to perform before using Kiln with SSH.
Contents
Process
Configuring SSH on Windows
-
Install the Kiln Client Tools.
-
Use Pageant to communicate with Kiln via SSH; by default, Pageant is installed to the following directory
C:\Program Files\TortoiseHg\
. The latest version of Pageant can be obtained from the Download PuTTY page. -
If you are running the Client Tools on Windows Server 2003 or an earlier version, update
pageant.exe
manually; PuTTY 0.60 (the version we ship) is not fully compatible with Windows Server 2003.
-
-
Generate the client SSH key:
-
If you are using Mercurial:
-
Create a new SSH-2 RSA key with PuTTYgen. We recommend using 2048-bit or 4096-bit keys.
-
Add a passphrase and save the key as a private key in PuTTYgen. Also, you can add it to your
Startup
group so that the key will be loaded automatically when you log in. -
Double-click on the saved key to load it into Pageant. Pageant stays active in the background and automatically provides the loaded key to TortoiseHg and Mercurial.
-
-
If you are using Git:
-
Create a new SSH-2 RSA key with PuTTYgen. We recommend using 2048-bit or 4096-bit keys.
-
When you save your private key, choose Conversions > Export OpenSSH Key.
-
Name the file
id_rsa
and put it in the .ssh folder (e.g., if the name of your Windows user is kiln, the path to your private key would beC:\Users\kiln\.ssh\id_rsa
).Note: Since Git uses OpenSSH, you will not need to open Pageant to connect to your repositories via SSH. If you are using only Git, you will not need to worry about Pageant at all.
-
-
-
Share your client key with Kiln:
-
In PuTTYgen, copy the text from the Public key for pasting box.
-
In Kiln, open the SSH Keys page from the top menu.
Note: SSH can be disabled by your Kiln administrator. In this case, the SSH Keys page and SSH repository links will not be available. -
Click Add a New Key and paste the newly created public key.
-
Click Save Key.
-
Configuring SSH on Mac and Unix
-
Generate an SSH key:
-
Open the terminal and run the following command:
ssh-keygen -t rsa
-
Follow the instructions in the terminal.
Note: We recommend using 2048-bit or 4096-bit keys.
-
-
Share your SSH key with Kiln:
-
In the terminal, run the command
cat ~/.ssh/id_rsa.pub
and copy its output. -
From the top menu in Kiln, click on your avatar and select the SSH Keys option.
-
Click Add a New Key and paste the public key.
-
Fingerprint
The SHA-256 hostfingerprint is:
sha256:9f:92:3f:fb:64:a5:19:8b:5e:d5:99:28:78:c1:bb:71:3f:29:7a:7e:57:e4:63:00:15:64:d1:06:67:41:d4:40
Please add the fingerprint above to your mercurial.ini file, under [hostsecurity]
as follows:
[hostsecurity]
<yoursite>.kilnhg.com=sha256:9f:92:3f:fb:64:a5:19:8b:5e:d5:99:28:78:c1:bb:71:3f:29:7a:7e:57:e4:63:00:15:64:d1:06:67:41:d4:40
Known Issues
If you are accessing Kiln repositories via SSH for the first time, you may encounter a warning about the certificate with the following fingerprint:
-
On Linux/Mac: SHA256:GIfIWDp22YlxN7bjk35+fKlanjL2P7hm99f4DF3Ty6k
-
On Windows: sha256:b6:e6:7e:86:91:84:29:b6:14:9c:23:57:1a:1d:27:67
Please note that this is the same fingerprint, but it is displayed in different formats. Hence, you can ignore this warning.
Disabling IP Whitelisting
Please note that IP whitelisting is not compatible with SSH. Hence, make sure to delete all IP whitelists.
Back to top
Switching Protocols
-
If you want to start pushing and pulling (via SSH) a repository that you cloned using HTTPS, open the file
hgrc
in the.hg
folder (in the repository on your machine). -
Change the URL in the file to the following format (replace
Old URL:https://
withssh://<your username>@
):
[paths] default = https://myaccount.kilnhg.com/Code/Widget/Group/myrepo
New URL:
[paths] default= ssh://myusername@myaccount.kilnhg.com/Code/Widget/Group/myrepo
- Save the updated file.
The SSH configuration is now complete.