git config --global user.name "zxc"
配置用户名

git config --global user.email "[email protected]"
配置邮箱

git设置公钥

此时,

会在C:\Users\Administrator目录下生成.gitconfig配置文件:

git设置公钥

请勿删除!


ssh-****** -t rsa -C "[email protected]"
生成公钥和私钥
按3次Enter,

不需要设置名称与密码
git设置公钥

 

cat ~/.ssh/id_rsa.pub

查看公钥

git设置公钥

 

 

路径是C:\Users\Administrator\.ssh

git设置公钥

 

 

GitLab添加公钥
git设置公钥

git设置公钥

git设置公钥

 

git设置公钥

 

 

 ssh -T [email protected]

测试配置文件是否正常工作

git设置公钥

 

git clone [email protected]:root/TestProject_1.git

拉项目到本地

git设置公钥

cd TestProject_1

进入项目

git设置公钥

相关文章:

  • 2021-04-11
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2021-11-21
  • 2021-07-31
  • 2022-12-23
猜你喜欢
  • 2021-11-03
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-10-22
  • 2021-07-19
  • 2021-07-04
相关资源
相似解决方案