zoukankan      html  css  js  c++  java
  • 利用Git生成本机SSH Key并添加到GitHub中

    本地仓库和github之间是通过SSH加密传输的,所以需要先到github中添加你本机的SSH Key 进行认证。

    1、在桌面打开git命令窗口

     


    2、输入“ssh-keygen -t rsa -C  youremail@example.com”

         回车确认,默认生成在win7当前登录用户家目录

     

    3、配置全局name 和email

    git config--global user.name "your_account"

    git config –globaluser.email youremail@example.com


    4、连续3次回车,默认设置空密码,创建key

     


    5、查看生成的公钥:cat ~/.ssh/id_rsa.pub

     

    6、复制内容到github里新添加一个SSH Key

     

     

    7、测试添加成功没有:

    出现一个警告

    问你,是否将IP为192.30.255.112的主机持久添加到已知的hosts文件中?

     

    到C:WindowsSystem32driversetc 目录下添加github的主机IP

     


    再测试一下:

     


    successfully!

  • 相关阅读:
    jq---方法总结
    Coderfroces 862 B . Mahmoud and Ehab and the bipartiteness
    Coin
    joisino's travel
    日天的终生大事(dp)
    Codefroces 852 G. Bathroom terminal
    Codefroces432 div2 A,B,C
    Atcoder ABC 069 C
    Codefroces 849 A,B
    HDU 6186 CS Course
  • 原文地址:https://www.cnblogs.com/fan-1994716/p/14821274.html
Copyright © 2011-2022 走看看