1、检查是否已经有SSH Key存在

windows:

type "%userprofile%\.ssh\id_rsa.pub"

Linux:

cat ~/.ssh/id_rsa.pub

 

如果存在,则进入第3步。

2、创建SSH keys

windows需要在git虚拟环境中运行,如果提示ssh-keygen,则先安装git,地址:

http://git-scm.com/download/win

如果很慢可以去百度盘下载:http://pan.baidu.com/s/1c2xd1ss

然后在任意文件夹下面点鼠标右键,选择 Git Bash Here

创建SSH keys

 

ssh-keygen -t rsa -C "GitLab" -b 4096

 linux无需安装,直接执行上面指令

全部默认值,回车

3、将SSH Key添加到git账号中

windiws运行下面指令会把公钥复制到剪贴板,然后粘贴到gitlab的user profile里面即可。

type "%userprofile%\.ssh\id_rsa.pub" | clip

 linux运行之后再手动复制:

cat ~/.ssh/id_rsa.pub

 

相关文章:

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