Skip to content

Instantly share code, notes, and snippets.

@kaangiray26
Last active October 25, 2021 14:56
Show Gist options
  • Save kaangiray26/2c1d7fd43c72802f67f76c107e59eb7d to your computer and use it in GitHub Desktop.
Save kaangiray26/2c1d7fd43c72802f67f76c107e59eb7d to your computer and use it in GitHub Desktop.
Creating SSH Keys for Git on Windows

Create SSH keys

ssh-keygen -t ed25519 -C "<github/gitlab email address>"

Copy the content of the public key and add to the git repo

Found usually under the following link:

Create your ssh config

notepad C:\Users\<username>\.ssh\config

Edit and add the following lines to the config

## Gitlab RWTH
Host <hostname>
  PreferredAuthentications publickey
  IdentityFile C:\Users\<username>\.ssh/id_ed25519

Add your ssh key identity

ssh-add C:\Users\<username>\.ssh/id_ed25519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment