github、gitlab 管理多个ssh key

 第一种方法: 经过 git 命令行来操做git

  一、cd ~/.ssh 服务器

  二、ls ssh

注:若是.ssh 目录下有文件存在那么表示以前添加过ide

  三、 ssh-keygen -t rsa -C "xxxxxx@yy.com"  # git 的帐户邮箱命令行

  Enter file in which to save the key (/c/Users/xxxx_000/.ssh/id_rsa):   # 输入文件的名称,推荐直接回车3d

  Enter passphrase (empty for no passphrase):   # 若是这里填写了密码,就不能实现免密码登陆了,推荐不填写blog

  Enter same passphrase again:   # 再次确认密码(能够为空)it

  Your identification has been saved in /c/Users/xxxx_000/.ssh/id_rsa.   #生成的密钥io

  Your public key has been saved in /c/Users/xxxx_000/.ssh/id_rsa.pub.  #生成的公钥登录

  四、复制id_rsa.pub的公钥内容到 git 服务器上

相关文章
相关标签/搜索