如何给 GitHub 添加 SSH key, 如何生成 SSH key 详细图文教程!
如何给 GitHub 添加 SSH key, 如何生成 SSH key 详细图文教程!
一、 生成 SSH key
创建一个空项目:(或使用真实 Linux 主机) PS: windows 类似(? CMD) ReadMore
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
:q2. 点击 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
Open Terminal.
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.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]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.
Ensure ssh-agent is enabled:
# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
Agent pid 59566Add 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
1
如何给 GitHub 添加 SSH key, 如何生成 SSH key 详细图文教程!的更多相关文章
- 代码文档生成工具-Doxygen生成CHM和RTF图文教程
Doxygen是一种开源跨平台的,以类似JavaDoc风格描述的文档系统,可以从一套归档源文件开始,生成chm格式的文档.本文主要讲解如何在winddows下安装doxygen. 1.下载do ...
- 转 SSH框架搭建详细图文教程
原址:http://blog.sina.com.cn/s/blog_a6a6b3cd01017c57.html 什么是SSH? SSH对应 struts spring hibernatestruts ...
- SSH框架搭建 详细图文教程
转载请标明原文地址 一.什么是SSH? SSH是JavaEE中三种框架(Struts+Spring+Hibernate)的集成框架,是目前比较流行的一种Java Web开源框架. SSH主要用于Jav ...
- SSH框架搭建详细图文教程(转)
这篇文章看的我醍醐灌顶的感觉,比之前本科时候学习的SSH架构 要清晰数倍 非常感觉这篇博主的文章 文章链接为:http://blog.sina.com.cn/s/blog_a6a6b3cd01017 ...
- SSH框架搭建详细图文教程
转载请标明原文地址:http://www.cnblogs.com/zhangyukof/p/6762554.html 一.什么是SSH? SSH是JavaEE中三种框架(Struts+Spring+H ...
- github版本库使用详细图文教程(命令行及图形界面版)
投稿:mdxy-dxy 字体:[增加 减小] 类型:转载 时间:2015-08-06我要评论 今天我们就来学习github的使用,我们将用它来管理我们的代码,你会发现它的好处的,当然是要在本系列教程全 ...
- .NET文档生成工具ADB使用图文教程
.NETv3.0 可再发行组件包 类型:编程辅助大小:2.7M语言:中文 评分:1.8 标签: 立即下载 ADB2.3使用指南 ADB2.3使用方法如下图所示: (1)主界面: (2)批量选择: 4. ...
- powerdesigner连接Mysql进行反向工程并生成word文档图文教程
1 软件版本 windows7 64位 powerdesigner 15.1 Mysql 5.1.56 mysql-connector-odbc-3.51.30-winx64 对于mysql-conn ...
- [转载]SSH框架搭建详细图文教程
http://www.cnblogs.com/hoobey/p/5512924.html
随机推荐
- FGC频繁 GC卡顿
https://mp.weixin.qq.com/s/I1fp89Ib2Na1-vjmjSpsjQ 线上服务的FGC问题排查,看这篇就够了! 原创 骆俊武 IT人的职场进阶 2020-05-10 ...
- 排查golang的性能问题 go pprof 实践
小结: 1.内存消耗分析 list peek 定位到函数 https://mp.weixin.qq.com/s/_LovnIqJYAuDpTm2QmUgrA 使用pprof和go-torch排查 ...
- 【PC Basic】CPU、核、多线程的那些事儿
一.CPU与核的概念 1.半导体中名词[Wafer][Chip][Die]中文名字和用途 Wafer--晶圆 wafer 即为图片所示的晶圆,由纯硅(Si)构成.一般分为6英寸.8英寸.12英寸规格不 ...
- FridaHook框架学习(2)
FridaHook框架学习(2) 前言 学习过程参考https://bbs.pediy.com/thread-227233.htm. 逆向分析 安装并运行例子程序,可以看到这个例子是一个验证注册码的程 ...
- Linux CGroup入门
Linux cgroup Linux CGroup全称Linux Control Group, 是Linux内核的一个功能,用来限制,控制与分离一个进程组群的资源(如CPU.内存.磁盘输入输出等).L ...
- SpringBoot-Maven打包压缩瘦身
SpringBoot-Maven打包压缩瘦身 一.Spring Boot 可执行 jar 分析 1.1 打包 1.2 两种 jar 的比较 1.3 一次打包两个 jar 二.SpringBoot迭代发 ...
- Linux——软件安装
Linux--软件安装 一.gcc 二.make 三.rpm 四.yum 一.gcc gcc是Linux上面最标准的C语言的编译程序,用来源代码的编译链接. gcc -c hello.c 编译产生目标 ...
- Java 8教程(知识内容详细,快速学习Java 8)
允许在接口中有默认方法实现 Lambda表达式 函数式接口 方法和构造函数引用 Lambda的范围 内置函数式接口 Predicates Functions Suppliers Consumers C ...
- java生成Https证书,及证书导入的步骤和过程
以下是相关的Tomcat,JDK和Windows环境: Tomcat版本:tomcat-7.0.55 JDK版本: jdk1.6.0 目录所在的位置: Serve的目录:D:\server\tomca ...
- docker学习一
由于本人学习精力有限,不能像大学时那样,每个笔记都认真的手敲记录,一些地方会截图展示,并会添加自己的理解和备注,建议大家也做自己的笔记,看别人的可以,但是自己动手并思考记忆更深刻. 1.什么是虚拟化 ...








