Windows Git初始化配置

Windows Git初始化配置

1、Git安装完毕后,从开始菜单中找到Git Bash,双击进入Git Shell界面

2、配置Name和Email

命令格式参考:
git config --global user.name "your name"
git config --global user.email "your email address"

3、生成Public/Private RSA Key

命令格式参考:
ssh-keygen -C "your email address" -t rsa

这里有一些注意事项:

  • 设置Public RSA Key的保存位置,直接回车采用默认地址;
  • 设置一个密码,并再次输入确认(这里不建议设置,方便本地使用)
  • Public RSA Key的保存路径:c:\users\username.ssh\id_rsa.pub

4、将Public Key告知Github

  • Home Page:https://github.com/
  • 进入Account Settings页面,打开SSH Keys,点击“Add SSH Key”。
  • 在本地打开c:\users\username.ssh\id_rsa.pub,把里面的内容全部Copy到Key对应的输入框内,点击“Add Key”。

5、添加SSH信任git@github.com站点

6、Clone Repositories

需要注意的是:

  • 版本库地址格式:git@github.com:your_resp_address
  • 保存目录的最后一级不能Exist;

文章作者: &娴敲棋子&
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 &娴敲棋子& !
评论
  目录