Git--生成公钥和私钥并添加gitlab访问权限

Git配置

打开git bash 执行以下命令

git config --global user.name 用户名
git config --global user.email 邮箱
ssh-keygen -t rsa

gitlab配置

  1. 打开生成的 .../.ssh/id_rsa.pub 并复制其中的内容
  2. 打开gitlab主页--点击头像--Settings--SSH Keys
  3. 将复制的内容粘到Key输入框中--Add Key

猜你喜欢

转载自www.cnblogs.com/P--K/p/11073040.html
今日推荐