- Open Bash Terminal
- Reference
ssh-keygen -t rsa -b 4096 -C "<Your GitHub Email ID>"
- Enter file in which to save the key
- Default is
id_rsa
or if you want change the type /<DRIVE>/Users/<Username>/.ssh/<id_rsa_test>
- Enter passphrase
- Enter same passphrase again:
- Start the ssh-agent in the background
eval $(ssh-agent -s)
- Add your SSH private key to the ssh-agent.
ssh-add ~/.ssh/<id_rsa_test>
- Add SSH key to Github account
- Reference
- Copy the SSH key on clipboard
clip < ~/.ssh/<id_rsa_test.pub>
- Open this link on your browser
- Link
- Click "New SSH key" button
- Give a Title Like:
- And paste key on the key Textarea
- Click "Add SSH key" button
- Now your newly crated SSH key icon is "Gray"
ssh -T git@github.com
- Reference
- Open your project directory
- Open your bash terminal on same project directory
eval $(ssh-agent -s)
ssh-add ~/.ssh/<id_rsa_test>
git clone git@github.com:arnabmunshi/Clone-With-SSH.git
- Now your newly crated SSH key icon turn into "Green"
Used git.io to short git url