1. SSH
存储在user/用户名/.ssh文件夹下
生成SSH密钥
$ ssh-keygen -t rsa -C "your_email"
2. 查看生成的公钥
$ cat ~/.ssh/id_rsa.pub
github帐户, Settings -> SSH and GPG keys -> New SSH key
$ ssh -T git@github.com
查看SSH公钥
3. 修改git的remote url
当前remote url
$ git remote -v
复制SSH链接用URL,用于连接git
git remote set-url origin git@github.com:someaccount/someproject.git