How to setup Git the proper way! — Part 2: Setting up SSH Key

Photo by Yancy Min on Unsplash

Before we start:

$ git --version

Generating SSH Keys

$ ssh-keygen -t ed25519 -C ""
> Enter a file in which to save the key (/c/Users/you/.ssh/id_ed25519):[Press enter] 
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]

Adding the SSH key to Github

$ clip < ~/.ssh/
$ pbcopy < ~/.ssh/
$ xclip -selection clipboard < ~/.ssh/

Configuring username and email

$ git config --global "your_username"$ git config --global ""

Testing our SSH connection

$ ssh -T
> The authenticity of host ' (IP ADDRESS)' can't be established.
> RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
> Are you sure you want to continue connecting (yes/no)?
> Hi username! You've successfully authenticated, but GitHub does not provide shell access.
ssh link for cloning on github
ssh link for cloning on github


Developer | Student | Techy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store