打开Git Bash 命令窗口
1.设置GitHub账户名字 写自己的GitHub账户名字
$ git config --global user.name "dz-hexiang"
2.设置GitHub登陆邮箱
$ git config --global user.email 472482006@qq.com
3.生成密钥
$ ssh-keygen -C '472482006@qq.com' -t rsa
4.回到 GitHub 个人首页,点击 Settings->SSH and GPG keys->New SSH key。
title 可以随便取名字,Key 里面添加的内容为 id_rsa.pub 文件内的字符串。然后点击 Apply 即可
5.然后通过 Git GUI 就可以上传项目到仓库了