- windows安装git。git下载地址链接:https://pan.baidu.com/s/1j6po-O7aRxnEzZDhVkR0zA 密码:o1n0
选择需要存放项目的目录,右键选择Git Bash Here,进入git命令行。
1)配置github用户名:git config –global user.name xx(github用户名)
2)配置github验证邮箱:git config –global user.email [email protected](github注册邮箱)
3)生成ssh keys,输入ssh-keygen -t rsa -C “[email protected]” (github注册邮箱)。生成的默认在~/.ssh目录。生成后会有id_rsa和id_rsa.pub两个文件。
4)将生成的密钥配置到github点击头像,选择settings
选择SSH and GPG keys
点击github New SSH keys 按钮,复制id_rsa.hub内容到文本框。点击Add SSH key完成。