zoukankan      html  css  js  c++  java
  • Windows GIT SSH 免密教程

    Windows GIT SSH 免密教程

    1. 安装git客户端,最新下载地址如下 https://github.com/git-for-windows/git/releases/download/v2.23.0.windows.1/Git-2.23.0-64-bit.exe

    2. 安装完毕后, 进入.ssh目录,笔者目录如下:
      C:UsersAdministrator.ssh,进入后,右键

      git bash here
      
    3. 新建ssh key

      ssh-keygen -t rsa -==C== "chonguo@126.com"
      键入 id_rsa_gitee
      按enter键直到结束,这时会发现生成两个私钥和公钥
      
    4. 将私钥加入到ssh agent

      ssh-add ~/.ssh/id_rsa_gitee
      

      如果出现 Could not open a connection to your authentication agent.
      则需要

      ssh-agent bash
      ssh-add ~/.ssh/id_rsa_gitee
      
    5. 在该目录下新建config文件

       
    	 #该配置用于个人gitee 上  
        #Host 服务器别名  
        Host gitee.com
        #HostName 服务器ip地址或机器名  
        HostName gitee.com
        #User连接服务器的用户名  
        User chonguo@126.com
        #IdentityFile 密匙文件的具体路径  
        IdentityFile C:UsersAdministrator.sshid_rsa_oschina
        
        #该配置用于个人 github 上  
        #Host 服务器别名  
        Host github.com
        #HostName 服务器ip地址或机器名  
        HostName github.com
        #User连接服务器的用户名  
        User chonguo@126.com
        #IdentityFile 密匙文件的具体路径  
        IdentityFile C:UsersAdministrator.sshid_rsa_github
    
        #该配置用于aliyun code 上  
        #Host 服务器别名  
        Host code.aliyun.com
        RSAAuthentication yes
        #HostName 服务器ip地址或机器名  
        HostName code.aliyun.com
        #User连接服务器的用户名  
        User chonguo@163.com
        #IdentityFile 密匙文件的具体路径  
        IdentityFile C:UsersAdministrator.sshid_rsa_aliyun
    
    1. 登录gitee或者github配置ssh keys,用notepad打开并复制id_rsa_gitee.pub中内容即可
  • 相关阅读:
    Laravel
    Laravel
    Laravel
    Http状态信息
    BeautifuSoup的使用
    js中select标签中的option选择
    正则表达式
    利用vi编辑器创建和编辑正文文件(二)
    利用vi编辑器创建和编辑正文文件(一)
    认证、权限与频率组件
  • 原文地址:https://www.cnblogs.com/pingyun/p/11443938.html
Copyright © 2011-2022 走看看