# Windows 配置 GitHub
# 一、下载 Git 客户端
在 Git官网 (https://git-scm.com/download/win (opens new window)) 中下载客户端并安装到本地。
# 二、配置 Git 用户名和邮箱
git config --global user.name "Your Name"
1
git config --global user.email "email@example.com"
1
# 三、生成秘钥
ssh-keygen -t rsa -C "email@example.com"
1
这边的邮箱就是上一步填的。
然后在 .ssh 目录下可以看到两个文件 id_rsa 与 id_rsa.pub。
# 四、查看并复制秘钥
cat id_rsa.pub
1
然后将内容复制。
# 五、配置 GitHub
登录 GitHub,在 Settings中的 SSH and GPG Keys 中 New SSH Key,在 key 中填入上一步复制下来的秘钥。
