Git users often feel irritate to give password for every push/pull. Using SSH key can resolve this irritation. User need to give password (key passphrase) once.
Generate PuTTY Key
- At first download PuTTY Key Generator from here
- Run puttygen.exe
- Press Generate button.
- Drag mouse pointer randomly on blank area below progress bar.
- Add your passphrase and then save private key on your computer. Next it will need for cloning and push/pull.
- Save the Open SSH Public Key.
Add SSH Public Key on Bitbucket
- Go to Manage Account.
- Click SSH Keys under Security menu.
- Press Add Key.
- A popup will come. Add your previously saved SSH Public Key.
Clone a Project
- Go to your repository and copy the SSH url of project.
- Paste this url when you will cloning a project.
- Load the saved private key.
- After that give your passphrase.
Cloning is started now. After that it will never ask you again for passphrase when you wanted to push/pull until the PuTTY session is lost.
Configure PuTTY Key for Existed Project
- First go to TortoiseGit Settings window (Select project -> Right click -> TortoiseGit -> Settings).
- Select Remote option under Git menu. Then select origin. All information of selected branch will appeared. Add the path of PuTTY Key (saved private key).
- Change the URL of repository from HTTP/HTTPS to SSH. Copy SSH url as like as clone.
- When you will push/pull check the Autoload PuTTY Key.
- Press OK. Push/Pull will start after you give your passphrase.
It will never ask you again for passphrase until the PuTTY session is lost.