zoukankan      html  css  js  c++  java
  • windows下如何github ssh 公钥

     
    1. 安装git,从程序目录打开 "Git Bash" 
    2. 键入命令:ssh-keygen -t rsa -C "email@email.com"
      "email@email.com"是github账号
    3. 提醒你输入key的名称,输入如id_rsa
    4. 在C:Documents and SettingsAdministrator下产生两个文件:id_rsa和id_rsa.pub
    5. 把4中生成的密钥文件复制到C:Documents and SettingsAdministrator.ssh 目 录下。
    6. 用记事本打开id_rsa.pub文件,复制内容,在github.com的网站上到ssh密钥管理页面,添加新公钥,随便取个名字,内容粘贴刚 
    才复制的内容。
    7. ^_^ OK了
     
    需要注意步骤2中产生的密钥文件在当前用户的根目录,必须把这两个文件放到当前用户目录的“.ssh”目录下才能生效。
    在windows中只能在命令行下输入创建"."开头的文件夹。命令为 mkdir .ssh
     

    xxx@xxx-PC xxx~
    $ ssh-keygen -t rsa -C "xxxx@xxxx.com"(git账号)
    Generating public/private rsa key pair.
    Enter file in which to save the key (/c/Users/xxxx/.ssh/id_rsa):(保存地址)
    Created directory '/c/Users/xxx/.ssh'.
    Enter passphrase (empty for no passphrase):(输入key的名称)
    Enter same passphrase again:(重复输入key的名称)
    Passphrases do not match. Try again.(输入不一致,重复输入)
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /c/Users/xxxx/.ssh/id_rsa.(保存地址)
    Your public key has been saved in /c/Users/xxxxx/.ssh/id_rsa.pub.(保存地址)
    The key fingerprint is:
    SHA256:xxxx  xxxx@xxxx.com
    The key's randomart image is:
    xxxx

  • 相关阅读:
    Saltstack module gem 详解
    Saltstack module freezer 详解
    Saltstack module firewalld 详解
    Saltstack module file 详解
    Saltstack module event 详解
    Saltstack module etcd 详解
    Saltstack module environ 详解
    Saltstack module drbd 详解
    Saltstack module dnsutil 详解
    获取主页_剥离百度
  • 原文地址:https://www.cnblogs.com/zhangxia/p/4955313.html
Copyright © 2011-2022 走看看