GitLab配置添加SSH Key

工具 gitbash

1. 配置姓名 ,邮箱

  1. 配置姓名
$ git config --global user.name "rongyang"
  1. 配置邮箱
$ git config --global user.email "[email protected]"

在这里插入图片描述

2. 客户端配置生成SSH密钥对

$ ssh-keygen -t rsa -C "[email protected]"

GitLab配置添加SSH Key_第1张图片
完成后在 ~/.ssh/ 会生成2个文件。id_rsa 和 id_rsa.pub。前者是私钥,注意保管,后者是公钥。
查看 ssh 公钥方法:

1.通过命令窗口
a. 打开你的 git bash 窗口

b. 进入 .ssh 目录:c

你可能感兴趣的:(配置ssh,reactjs)