1) Download git from https://git-scm.com/downloads
2) Install Git and when asked choose Use Git from the Windows Command Prompt option –
3) Set HOME variable to your user directory like C:\users\your-username-here . Run the command bellow by replaying your-username-here with your computer username via CMD or RUN ( Win + R)
setx HOME C:\users\your-username-here
4) check if everything is OK so far by running
git --version in CMD. If it prints back the version of git then everything is good so far.
5) Open Git Bash from Start>All apps>Git>Git Bash and run
Keep the default filename (just press enter when it ask for filename to keep the default one) and provide a password for the key file. You have to provide the password every time you want to push any changes to git servers. You can also leave it empty for no password. Then you do not need to enter any password in future for pushing changes.
7) For GitHub: Go to https://github.com/settings/keys and click New SSH Key. For Bitbucket go to Bitbucket settings and select SSH Keys under Security and click Add key.
6) Press Win + X and select Command Prompt to run command prompt (cmd) and run –
clip < .ssh/id_rsa.pub
This will copy the public key to your clipboard. Now paste it to the key field of GitHub or Bitbucket page you opened at step 7.
7) Now press Add SSH key (GitHub) or Add key (Bitbucket) and from now on you can clone using SSH address of your git repo and push with SSH encryption.