I had a similar problem and I finally solved it.
My decision:
First, follow the instructions here to check the existing key for Github and create one if one does not exist. Do not copy or paste the code, carefully read the instructions, because there is a code that you must change and configure.
By the way, at this stage I had problems trying to change the ~ / .ssh / id_rsa file, but it turned out that it does not really matter. However, if you really want to save your SSH key and not enter it every time you press and pull, you can go to your .ssh directory and make the "config" file useful "nano" and enter the following:
Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa
Secondly, copy your SSH key to the clipboard. This step is mentioned, but not shown in the detailed step, my way of doing this is:
cd ~ ls -a cd .ssh cat id_rsa.pub
I'm sure there should be better ways, but they do not work for me, perhaps because I had problems opening a text editor in git.
Third, add the key you just created to your Github account.
If you do all this, your git may work just as well as mine.
All links from: https://help.github.com/articles/connecting-to-github-with-ssh/#generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Weisi zhan
source share