一,git配置github远程仓库
1,配置用户名和邮箱
1,命令行进行配置
git config --global user.name "username"
git config --global user.email "email"
2,查看已配置的用户信息
配置后检查,可以避免后面不少的问题,所有我们可以查看一下刚才配置后信息是否正确
git config --list
命令自行后,就可以在末尾查看配置过的刚才配置的用户名和邮箱了
注:顺便提一下如何删除用户名和邮箱,可能有需要,顺带写上了。
git config --global --unset user.name "username"
git config --global --unset user.email "email"
2,秘钥SSH keys生成
打开git命令窗口
ssh-keygen -t rsa -C "youremail@163.com"
代码参数含义:
-t 指定密钥类型,默认是 rsa ,可以省略。
-C 设置注释文字,比如邮箱。
-f 指定密钥文件存储文件名。
以上代码省略了 -f 参数,因此,运行上面那条命令后会让你输入一个文件名,用于保存刚才生成的 SSH key 代码,如:
Generating public/private rsa key pair.
# Enter file in which to save the key (/c