一 、
設置git的user name和email:
$ git config --global user.name "xuhaiyan"
$ git config --global user.email "haiyan.xu.vip@gmail.com"
二、生成SSH密鑰過程:
1.查看是否已經有了ssh密鑰:$ cd ~/.ssh
如果沒有密鑰則不會有此文件夾,有則備份刪除
2.生存密鑰:
$ ssh-keygen -t rsa -C “haiyan.xu.vip@gmail.com”
按3個回車,密碼為空。
Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
………………
最后得到了兩個文件:id_rsa和id_rsa.pub
3.在github上添加ssh密鑰,這要添加的是“id_rsa.pub”里面的公鑰
添加完后在git登陸的情況下,clone。。。OK