配置SSH Key和账号、邮箱信息
我们选择使用SSH方式来管理代码,由于本地Git仓库和GitHub仓库之间的传输是通过SSH加密的,所以必须要让github仓库认证你SSH key,在此之前,必须要生成SSH key。
任意位置右键—点击“Git Bash Here”,输入:
ssh-keygen -t rsa -C '[email protected]'
其中-t指定密钥类型,这里设置rsa即可,-c是密钥的注释,这里设置成邮箱方便分辨;
一路回车即可;
- 配置用户名和邮箱:
- git config --global user.name "1410475107"
- git config --global user.email "[email protected]"
The email is only optional field to identify the key.邮箱仅仅是识别用的key
When you create the ssh you type (for example