生成ssh秘钥
$ git config --global user.name "luoyong"
$ git config --global user.email "[email protected]"  ##填写自己的邮箱
3、生成ssh**
$ ssh-****** -t rsa -C "[email protected]" //直接按3次回车选择无密码
4、添加私钥到ssh
$ eval $(ssh-agent -s) //打开ssh-agent
$ ssh-add ~/.ssh/id_rsa //id_rsa为私钥文件名,默认在用户目录下.ssh中

git创建秘钥

5、将公钥添加到GitLab
Profile Settings->SSH Keys ->Add an SSH key
将~/.ssh/id_rsa.pub中内容添加到SSH Keys中
6、测试


相关文章:

  • 2021-05-15
  • 2022-12-23
  • 2021-07-22
  • 2021-06-09
  • 2021-11-13
  • 2021-05-30
  • 2022-01-13
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2021-12-12
  • 2022-12-23
  • 2021-10-17
  • 2021-09-12
  • 2021-07-01
  • 2021-11-01
相关资源
相似解决方案