After you have completed the installation of both TortoiseGit and mysysgit the next step is to generate yourself an SSH key to connect to an existing git repository. This key will be used to authenticate you with your remote Git repository.
To generate SSH Key using “PuTTY Key Generator” that comes with TortoiseGit. You will find this under Start > Programs > TortoiseGit.
Run the PuTTY Key Generator and click “Generate”. Now move your mouse around on the blank area until it tells you to stop.
Once the key has been generated your public key will be shown in the blank area.
Enter a passphrase if desired, TortoiseGit will prompt you for this when you connect to the git repository.
Do not use the “Save public key” button. It saves it in a strange format that only PuTTY understands. Instead copy the public key temporarily into Notepad for later use.
Then click the “Save private key” button and save the private key file to the hard drive. TortoiseGit will prompt you for this when you use TortoiseGit to clone the git repository.
When using remote repository such as GitHub or BitBucket you will need to give them your “Public” key. Normally this just involves copy/pasting the textual key into a box in your account settings on the repository management site (such as GitHub or BitBucket).
GitHub
In GitHub, you will find: “Edit your Profile > SSH Keys > Add New SSH key” and looks like below.
Give the key a meaningful name. Copy the SSH key you have saved in Notepad earlier and paste it here.
BitBucket
Copy the SSH key you have saved in Notepad earlier and paste it here then Click Add Key.
Use TortoiseGit to run the git clone command. The “git clone” command creates a local copy of a remote repository.
In Windows Explorer, right-click your root project folder and click “Git Clone…”.
Url: The Url of the remote repository.
Directory: This will be pre-filled with your root project folder. This may now include the name of the project specified in Url. Change this as necessary to point to your desired local folder.
Load Putty Key: Select the private Putty key that you saved earlier.
Click OK.
The git project source is successfully cloned to your local system.