Skip to main content

Configuring Git SSH Keys

·101 words
icysamon
Author
icysamon
Electronics & Creator

Here, we’ll use GitHub as an example.

Check for SSH keys on your computer.

cd ~/.ssh
ls

Check for the existence of id_rsa and id_rsa.pub. If they do not exist, create a new SSH key using the following command.

ssh-keygen -t rsa -C “[email protected]

Replace [email protected] with your GitHub username.

Tip

You’ll be prompted three times, so press the Enter key three times.

Retrieve the SSH key.

cat id_rsa.pub

Copy the output.
Go to SSH and GPG keys in your GitHub settings, create a new key, and paste the copied text exactly as is.

This completes the Git SSH key setup.