GitHub and git integration: using ssh instead of https
Introduction In our last article, we demonstrated how we could mirror our repository from our local computer to GitHub and use https to push our repository data from our local computer to GitHub. In this article, we will demonstrate how we may use the ssh protocol to authenticate with GitHub and push changes to it. Demonstration: First, we will need to generate our ssh keys on our local computer. We will be using these keys to authenticate with GitHub. [sahil@git-ansible ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/sahil/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/sahil/.ssh/id_rsa. Your public key has been saved in /home/sahil/.ssh/id_rsa.pub. The key fingerprint is: b3:b4:0c:ad:44:a2:c4:7b:46:52:1e:5d:c9:14:7c:d0 sahil@git-ansible The key's randomart image is: +--[ RSA 2048]----+ | o. === | | . o .. + E | | + + . . | | . = o . | | o o o S | | o . = + | | . + | | | | | +-----------------+ [sahil@git-ansible ~]$ ls -l /home/sahil/.ssh total 24 -rw-r--r--. 1 sahil sahil 658 Dec 28 04:03 authorized_keys -rw-------. 1 sahil sahil 668 Dec 17 20:26 id_dsa -rw-r--r--. 1 sahil sahil 601 Dec 17 20:26 id_dsa.pub -rw------- 1 sahil sahil 1679 Jun 12 09:44 id_rsa -rw-r--r-- 1 sahil sahil 399...
Read More