1.设置公钥 ssh-keygen -t rsa -C "github用户名" 然后一路回车 2.查看公钥 cat ~/.ssh/id\_rsa.pub 查看生成的公钥 3.到github上去设置公钥 然后打开github官网 github官网 找到Setting SSH and GPG keys 然后将 cat 获得的内容复制到 key 中 title 随便填写 查看更多