windows环境下git的搭建及使用(2)

1.在GitHub上注册账号

注册好后,鼠标右键点击Git Bash,用账号进行环境配置

2.设置配置文件

配置用户名

git config --global user.name "username"    //( "username"是自己的账户名,)

配置邮箱

git config --global user.email "[email protected]"		//("[email protected]"注册账号时用的邮箱)

windows环境下git的搭建及使用(2)_第1张图片
在命令框中输入以下命

ssh-keygen -t rsa

连敲三次回车键,将生成ssh文件
在这里插入图片描述
将ssh文件夹中的公钥( id_rsa.pub)添加到GitHub管理平台中
windows环境下git的搭建及使用(2)_第2张图片
测试一下配置是否成功,在Git Bush命令框(就是刚才配置账号和邮箱的命令框)中继续输入以下命令,回车

git config --global --list 命令查看配置是否OK

windows环境下git的搭建及使用(2)_第3张图片

你可能感兴趣的:(windows环境下git的搭建及使用(2))