如何给 GitHub 添加  SSH key, 如何生成  SSH key 详细图文教程!

一、 生成  SSH key

https://ide.c9.io/xgqfrms/

创建一个空项目:(或使用真实 Linux 主机) PS: windows 类似(? CMDReadMore

https://ide.c9.io/xgqfrms/demo

打开 shell(bash), 输入:

$ npm install -g git-it

生成 SSH-Key

$ ssh-keygen -t rsa -b 4096 -C "username@email.com"

检查,添加 ssh-key 到,linux client:

$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_rsa

复制 ssh-key public 到 剪切板:

$ clip < ~/.ssh/id_rsa.pub

如果不好使, 使用vim 打开,复制即可!

$ cd /home/ubuntu/.ssh/

$ ls -l

$ vim id_rsa.pub

PS: 退出 vim 方法:

1. 点击 esc 键,进入vim命令模式 输入 :q

:q

2. 点击 Enter 即可退出!

NEW:   after add ssh key ,you should close the terminal & restart a new terminal!

二、 给 GitHub 添加  SSH key

1. 打开 设置>SSH and GPG Keys> New SSH key ,

2. 将复制的 id_rsa.pub 的 key 值,粘贴到 key 文本框,点击 Add SSH key 即可!

ok!

NEW:   after add ssh key ,you should close the terminal & restart a new terminal!

1

Checking for existing SSH keys

https://help.github.com/articles/checking-for-existing-ssh-keys/#platform-linux

Adding a new SSH key to your GitHub account

https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

1

Multi Account for GitHub!

new path

创建 config,配置 multi account for GitHub!
touch config
编辑 config
vim config

NEW:   after add ssh key ,you should close the terminal & restart a new terminal!

1

1

Generating a new SSH key and adding it to the ssh-agent

After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.

Generating a new SSH key

  1. Open Terminal.

  2. Paste the text below, substituting in your GitHub email address.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    # Creates a new ssh key, using the provided email as a label
    Generating public/private rsa key pair.
  3. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.

    Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
    

    using new path in case of override your other SSH-keys
     Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]

    $ Enter a file in which to save the key (/Users/you/.ssh/id_rsa): /Users/you/.ssh/id_rsa_github [Type a passphrase]
    
  4. At the prompt, type a secure passphrase. For more information, see "Working with SSH key passphrases".

    Enter passphrase (empty for no passphrase): [Type a passphrase]
    Enter same passphrase again: [Type passphrase again]

Adding your SSH key to the ssh-agent

Before adding a new SSH key to the ssh-agent, you should have checked for existing SSH keys andgenerated a new SSH key.

  1. Ensure ssh-agent is enabled:

    # start the ssh-agent in the background
    $ eval "$(ssh-agent -s)"
    Agent pid 59566
  2. Add your SSH key to the ssh-agent. If you used an existing SSH key rather than generating a new SSH key, you'll need to replace id_rsa in the command with the name of your existing private key file.

    $ ssh-add ~/.ssh/id_rsa
    
  3. Add the SSH key to your GitHub account.

1

 

如何给 GitHub 添加 SSH key, 如何生成 SSH key 详细图文教程!的更多相关文章

  1. 代码文档生成工具-Doxygen生成CHM和RTF图文教程

    Doxygen是一种开源跨平台的,以类似JavaDoc风格描述的文档系统,可以从一套归档源文件开始,生成chm格式的文档.本文主要讲解如何在winddows下安装doxygen.     1.下载do ...

  2. 转 SSH框架搭建详细图文教程

    原址:http://blog.sina.com.cn/s/blog_a6a6b3cd01017c57.html 什么是SSH? SSH对应 struts spring hibernatestruts ...

  3. SSH框架搭建 详细图文教程

    转载请标明原文地址 一.什么是SSH? SSH是JavaEE中三种框架(Struts+Spring+Hibernate)的集成框架,是目前比较流行的一种Java Web开源框架. SSH主要用于Jav ...

  4. SSH框架搭建详细图文教程(转)

    这篇文章看的我醍醐灌顶的感觉,比之前本科时候学习的SSH架构 要清晰数倍  非常感觉这篇博主的文章 文章链接为:http://blog.sina.com.cn/s/blog_a6a6b3cd01017 ...

  5. SSH框架搭建详细图文教程

    转载请标明原文地址:http://www.cnblogs.com/zhangyukof/p/6762554.html 一.什么是SSH? SSH是JavaEE中三种框架(Struts+Spring+H ...

  6. github版本库使用详细图文教程(命令行及图形界面版)

    投稿:mdxy-dxy 字体:[增加 减小] 类型:转载 时间:2015-08-06我要评论 今天我们就来学习github的使用,我们将用它来管理我们的代码,你会发现它的好处的,当然是要在本系列教程全 ...

  7. .NET文档生成工具ADB使用图文教程

    .NETv3.0 可再发行组件包 类型:编程辅助大小:2.7M语言:中文 评分:1.8 标签: 立即下载 ADB2.3使用指南 ADB2.3使用方法如下图所示: (1)主界面: (2)批量选择: 4. ...

  8. powerdesigner连接Mysql进行反向工程并生成word文档图文教程

    1 软件版本 windows7 64位 powerdesigner 15.1 Mysql 5.1.56 mysql-connector-odbc-3.51.30-winx64 对于mysql-conn ...

  9. [转载]SSH框架搭建详细图文教程

    http://www.cnblogs.com/hoobey/p/5512924.html

随机推荐

  1. 如何在opencv下使用SIFT

    SIFT即尺度不变特征变换,是用于图像处理领域的一种描述.这种描述具有尺度不变性,可在图像中检测出关键点,是一种局部特征描述子.SIFT的尺度不变特征变换在图像特征点匹配中十分关键,因为我们从不同角度 ...

  2. 通过 JFR 与日志深入探索 JVM - TLAB 原理详解

    全系列目录:通过 JFR 与日志深入探索 JVM - 总览篇 什么是 TLAB? TLAB(Thread Local Allocation Buffer)线程本地分配缓存区,这是一个线程专用的内存分配 ...

  3. MySQL数据库的逻辑架构和存储引擎

    和其他数据库相比,MySQL数据库的架构与众不同,它的架构可以在多种不同的场景中应用并发挥良好的作用:主要体现在存储引擎上的架构上,插件式的存储引擎架构将查询处理和其他的系统任务以及数据存储提取相分离 ...

  4. Mysql:好好的索引,为什么要下推?

    前段时间有读者提议讲讲索引下推,这期就把这事儿安排上.多余的前言就不赘述了,我们直接开始. 列位坐好! 图注:思维导图 回表操作 对于数据库来说,只要涉及到索引,必然绕不过去回表操作.当然这也是我们今 ...

  5. Flink-v1.12官方网站翻译-P022-Working with State

    有状态程序 在本节中,您将了解Flink为编写有状态程序提供的API.请看一下Stateful Stream Processing来了解有状态流处理背后的概念. 带键值的数据流 如果要使用键控状态,首 ...

  6. Codeforces Round #656 (Div. 3) D. a-Good String

    题目链接:https://codeforces.com/contest/1385/problem/D 题意 一个小写字母串称为 $c-good\ string$,如果至少满足以下条件之一: 字符串长度 ...

  7. 【uva 753】A Plug for UNIX(图论--网络流最大流 Dinic)

    题意:有N个插头,M个设备和K种转换器.要求插的设备尽量多,问最少剩几个不匹配的设备. 解法:给读入的各种插头编个号,源点到设备.设备通过转换器到插头.插头到汇点各自建一条容量为1的边.跑一次最大流就 ...

  8. lca讲解 && 例题 HDU - 4547

    一. 最普通的找树中两个点x,y最近公共祖先: 在进行lca之前我们要先对这一颗树中的每一个点进行一个编号,像下图一样.这个编号就是tarjan算法中的dfn[]数组 这样的话我们可以在跑tarjan ...

  9. Slim Span POJ 3522 (最小差值生成树)

    题意: 最小生成树找出来最小的边权值总和使得n个顶点都连在一起.那么这找出来的边权值中的最大权值和最小权值之差就是本题的结果 但是题目要求让这个输出的结果最小,也就是差值最小.那么这就不是最小生成树了 ...

  10. Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final) C. The Delivery Dilemma (贪心,结构体排序)

    题意:你要买\(n\)份午饭,你可以选择自己去买,或者叫外卖,每份午饭\(i\)自己去买需要消耗时间\(b_i\),叫外卖需要\(a_i\),外卖可以同时送,自己只能买完一份后回家再去买下一份,问最少 ...