1、下载 Git 安装
- 下载地址:https://git-scm.com/downloads
2、配置用户名与邮箱
- GitLab / GitHub / 码云等平台注册账号。
- 配置用户名与密码
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
- 注:出现如下错误 Git-remote Incorrect username or password ( access token ) 。解决:https://blog.csdn.net/qingzhuyuxian/article/details/85710818
3、配置 SSH KEY
- 生产 SSH KEY,C:\Users<你的用户名>.ssh 目录下生成一对公私密钥。
ssh-keygen -t rsa -C "YOUR EMAIL ADDRESS"
- 配置 SSK KEY :拷贝公钥(.pub 结尾的文件)添加到对应的 Git 平台。