Keywords: Git, Bitbucket, SSH key, TortoiseGit, Tortoise Git
This blog shows the process how to set Tortoise Git to connect Bitbucket using SSH key.
Steps:
1. Open StartMenuTortoiseGitPuttygen.
2. Generate a public/private key pair.
3. Log on BitBucket, then open page Manage accountSSH keys.
4. Click [Add key] in the page opened at #3, then "Add SSK key" dialog opens.
5. In the "Add SSK key" dialog,
5.1 Copy the public key generated at #2 and paste it into Key field.
5.2 Enter some words in Label field, 20131222 for example which indicates the date when this key is added.
5.3 Click [Add key] button to save key and close the dialog.
6. Back to Puttygen window. Click [Save public key] and [Save private key] to save your keys into files.
7. Right-click on folder of the git local repository, select TortoiseGitSettings to open the Settings dialog.
8. On the tortoise git Settings dialog,
8.1 Select GitRemote from tree at left of the dialog.
8.2 Select "origin" from Remote list box. Then, the remote data will be loaded into fields at right side.
8.3 Copy the SSH url from Bitbucket and paste it into the URL field. See screenshot below for SSH url in Bitbucket.
8.4 In the Putty field, navigate to the private key file you created at #6.
8.5 Click [OK] to save changes and close the Settings dialog.
9. You are ready to connect Bitbucket server using SSH key at this step. Go ahead to make a pull on your local repository.