

If you get that message, then you have successfully connected your computer with GitHub. We'll go back to our terminal and we'll enter ssh -T This will verify that we can connect to this host. We have to verify that GitHub and our local machine can communicate. Simply click add key, confirm your password, and then you have that key in your list of keys. I like to call it the name of my computer, so Hippotigris, and paste in your ssh key. Go to your profile, edit profile, ssh keys, and add ssh key. With your public pair of your ssh key on your clipboard, now you can go to GitHub. On a Mac, you use pb copy < and then point to your public rsa key.
#Using ssh with git on mac windows
On a Windows machine you can enter clip < and then point to your public rsa key. We're going to copy the public pair of our ssh key and give that to GitHub. Now, that we've configured ssh locally on our machine, we need to inform GitHub about our ssh key so when we push code, it can verify that key with GitHub. We need to add our rsa key to ssh, so we'll type in ssh-add and then point to our ssh key.

If you're on a Windows machine, make sure you type this in your Git Bash, ssh-agent -s. To do this, you'll type eval ssh-agent -s on a Mac.

Now, we need to add our ssh key to the ssh agent program. That's what we need to authenticate with GitHub. We see that we have an id_rsa and an id_rsa.pub. We can verify this by listing out the files in the ssh directory. If you wish to add an extra layer of security, you can add a pass phrase. We can go with the default place to save this key pair and then we can enter a new pass phrase. I'll enter That will generate a new key pair. You can do this by executing ssh-keygen -t rsa -b 4096-C, and then you enter your email. Otherwise, you need to generate a new key. If you see something that shows id_rsa or id_rsa.pub, or some pair like that, then you don't need to generate a new key and you're all set to go. If you see something like this, then that means you have not yet configured your ssh keys. Open up your terminal, or if you're on a Windows machine, make sure that you're opening up Git Bash, and enter in the command ls -al. We're going to configure this authentication with SSH. Now that we have Git configured locally on our machine, we have to authenticate our Git with GitHub so that when we push something to GitHub, GitHub knows who we are and whether or not we have access to push to where we're trying to push.
