How to set ssh key for github in Windows
In this article, we gonna speak about setting an ssh key in github and windows in order to secure our connections and to be authenticated.
> ssh-keygen
Enter the passphrase you want.
Now, type enter th folder .ssh. You should see 2 files :
- id-rsa (private key) and id-rsa.pub(public key)
Now, we need to identify ourselves by setting an ssh-agent, type:
> ssh-agent
Then add your private key to the agent by typing :
> ssh-add id_rsa
Now, go to github.com and then to settings
Now, go to SSH and GPG keys
Then add a new ssh key . You will find a vue like this :
For the title, enter the name you want and in Key field, paste the content of your public key (which is id-rsa.pub) then click ‘Add SSH key’.
The last step is to verify that we have configured ssh well, go to command line and type :
> ssh -T git@github.com
You should see this message :
— — — — — — — — — — — —
Hi faressalhi! You’ve successfully authenticated, but GitHub does not provide shell access.
— — — — — — — — — — — —
Hope this article is beneficial for you. Thanks