How to add SSH key to Git Repo
-
Set up your default identity. In terminal, write the command:
-
List the contents of
~/.ssh
to view the key files. -
Add the key to the ssh-agent. To start the agent, run the following:
-
Add the public key to your online git settings. Open the account settings page, then find and go to the SSH Keys settings. You will be prompted to add a key to your account.
-
Retreive the public key that you generated
-
Select and copy the key output in the clipboard. Paste in the browser and click save.