Skip to main content

Git Repo Clone With SSH

This will save up a lot of your time trying to fix SSL Error, certification problem

  1. Go to your dir to check if key exist C:\Users\username.ssh
cd %userprofile%\.ssh`
  1. Use putty to gen a key and convert openssh
  2. Open putty key generator, under key menu select generate key pair
  3. Move your mouse to generate randomness
  4. Put in your password, save your private key and public key
  5. Copy pub key to Bitbucket / GitHub personal acc
  6. Go to your profile > ssh keys
  7. Copy from putty and paste there
  8. Open git bash, right click on directory - select git bash) into place you wanna clone
  9. Activate ssh agent and add your key to ssh agent, and type your ssh key password
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa

Turn on the credential helper so that Git will save your password

  1. By default, Git will cache your password for 15 minutes.
  2. In Terminal, enter the following:
# Set git to use the credential memory cache
git config --global credential.helper cache

Common Error

FATAL ERROR: No supported authentication methods available (server sent: publickey)

  1. Open Pageant add private key