使用ssh代替https连接github
生成ssh key
$ ssh-keygen
添加public key到github
Settings
->SSH and GPG keys
->New SSH key
复制刚才生成的id_rsa.pub
的内容测试ssh连接
如果出现Host key verification failed
错误,命令行输入$ ssh -T [email protected]
git config中替换掉https
[url "[email protected]:"] insteadOf = https://github.com/ 或者
git config [email protected]:.insteadOf https://github.com/