如何给 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. Python+Selenium+Unittest实现PO模式web自动化框架(3)

    1.Outputs目录下的具体目录功能 2.logs目录 logs目录是用于存放log日志的一个目录. 2.reports目录 reports目录是用于存放测试报告的. 3.screenshots目录 ...

  2. apache httpclient 4 范例

    下面是一个通过apache httpclient 4 实现http/https的普通访问和BasicAuth认证访问的例子.依赖的第三方库为: 下面是具体实现: package test; impor ...

  3. HDU3062 PARTY

    Party Problem Description 有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席.在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛 ...

  4. LOJ104 普通平衡树

    题目描述 这是一道模板题. 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 插入  x 数: 删除  x 数(若有多个相同的数,因只删除一个): 查询  x 数的排名(若 ...

  5. Cookie (设置与读取、超时设置、指定路径、显示用户上次登录时间)

    Cooike简介 Cookie 是在 HTTP 协议下,服务器或脚本可以维护客户工作站上信息的一种方式.Cookie 是由 Web 服务器保存在用户浏览器(客户端)上的小文本文件,它可以包含有关用户的 ...

  6. 在Android用vulkan完成蓝绿幕扣像

    效果图(1080P处理) 因为摄像头开启自动曝光,画面变动时,亮度变化导致扣像在转动时如上. 源码地址vulkan_extratest 这个demo主要测试二点,一是测试ndk camera集成效果, ...

  7. sqoop使用以及常见问题

    1.hdfs文件的权限问题 问题分析与解决: 根据报错信息是hdfs文件的权限问题,命令进入集群执行的用户为null,而hdfs文件所有者为hdfs. 要么以用户hdfs执行命令,要么调整hdfs文件 ...

  8. 2020牛客暑期多校训练营(第八场)Game SET

    传送门:Game SET 题意 一套牌有四种属性,每种属性都有三种特征,shapes (one, two, or three), shape (diamond, squiggle, or oval), ...

  9. Codeforces Round #651 (Div. 2) E. Binary Subsequence Rotation(dp)

    题目链接:https://codeforces.com/contest/1370/problem/E 题意 给出两个长为 $n$ 的 $01$ 串 $s$ 和 $t$,每次可以选择 $s$ 的一些下标 ...

  10. hdu 6867 Tree 2020 Multi-University Training Contest 9 dfs+思维

    题意: 给你一个由n个点,n-1条有向边构成的一颗树,1为根节点 下面会输入n-1个数,第i个数表示第i+1点的父节点.你可以去添加一条边(你添加的边也是有向边),然后找出来(x,y)这样的成对节点. ...