I used to do projects using Git, which is basically working directly on the IDE. is simply a push.pull.merge. Recently intends to systematically learn about git, to lay a good foundation for future work. So git was installed under Linux, and some commands were contacted in the local repository. This error occurs when you intend to submit to the remote repository. By collecting data, it is due to the fact that the GitHub account does not have SSH public key information set
Go to GitHub and choose settings, as shown
Open, click Create a new SSH key, as shown in figure
Get the following image, title add a name, I named Id_rsa.pub, I did not try, it should be any name can be
The next step is to enter Cat ~/.ssh/id_rsa.pub in the Linux environment, and if no information is present, the key is not generated, so execute the following command
SSH-KEYGEN-T RSA
All the way to the carriage return ...
Finally, enter "Ssh-t git@github.com" to confirm OK.
Try the output again and you should have it.
Then copy the generated public key to GitHub key and click on Add SSH key to complete
Finally, after executing GIT push-u Origin master under the local git directory, you can submit the remote repository code successfully.