open Git Bash
$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
If you have one skip to Add
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
$ eval $(ssh-agent -s)
> Agent pid 59566
$ ssh-add ~/.ssh/id_rsa
you will need the contents of C:\Users\<USERNAME>.ssh\id_rsa
- BitBucket - Set up SSH for Git on Windows > Step 3. Add the public key to your Bitbucket settings. You may need to expand
Expand for details
. - GitHub - Adding a new SSH key to your GitHub account
Already sorted 😊👍
Open PuTTY Key Generator (Start > PuttyGen) either Generate or Conversions (my preference)
Conversions > import key > C:\Users\<USERNAME>\.ssh\id_rsa
Note: If you don't see file extensions two file will appear to have the same name. The first (looks like a text file) is the one you want.
- Save public key
Bitbucket.pub.ppk
Note .pub. in the file name for the public key. - Save private key
Bitbucket.ppk
Edit C:\Users\<USERNAME>\mercural.ini
and add ssh = ssh -C
under [ui]
[ui]
# name and email (local to this repository, optional), e.g.
username = Alex McTest <AlexMcTest@some-domain.com>
ssh = ssh -C
In Tortoise HG check repos start with ssh://hg@
Open the repo View > Syncronise (Alt+4)
If you're fed up with typing in password every time 😕
Create a shortcut in C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
If you create a shortcut in windows Right Click > New > Shortcut you will need to point to the exe ("C:\Program Files (x86)\PuTTY\pageant.exe"
) and then Right Click > Properties to edit the details.
If you have PuTTY installed.
"C:\Program Files (x86)\PuTTY\pageant.exe" Bitbucket.ppk
or if you don't have PuTTY installed but do have TortoiseGit
"C:\Program Files\TortoiseGit\bin\pageant.exe" Bitbucket.ppk
C:\Users\<USERNAME>\.ssh