Windows git配置及关联github
下载并安装git
- git下载地址 https://git-scm.com/download/win
- 直接点击下载后的文件安装即可
注册github(如果已经注册,跳过)
https://github.com/
记住注册的用户名和邮箱
配置git
- 配置用户名和邮箱
进入powerShell终端:执行下面的命令配置用户名和邮箱
git config --global user.name "你的github上的名字"
git config --global user.email "你的github邮箱"
使用 git config --list 查看配置结果
- 本地生成ssh 的key
ssh-keygen -t rsa -C "你的github邮箱"
执行 "cat C:\Users\某.ssh\id_rsa.pub" 或者直接通过资源管理器打开这个文件;复制刚刚生成的key。
打开github网站,在settings->SSH and GPLKeys
贴上刚刚的key
- 验证github的连通性
ssh git@github.com

浙公网安备 33010602011771号