Git Clone using SSH

Mohan Sharma - Jul 24 - - Dev Community

Generate SSH keys using below command

  • ssh-keygen -t ed25519 -C "abc@email.com" -f ~/.ssh/g

Copy and put public key in GitHub/Gitlab console.

  • cat ~/.ssh/g.pub | clip

Check if SSH agent is running. This agent hold private key.

  • eval "$(ssh-agent -s)"

Pass private key to SSH agent

  • ssh-add /C/Users/mohansharma/.ssh/g

To clone a Git repository using SSH, use the git clone command followed by a valid SSH URL

  • git clone <SSH URL>
. . . . . . . . . . . . . . .
Terabox Video Player