如何给 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.pubPS: 退出 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
随机推荐
- cisco asa 5525 思科防火墙设置拨号访问内网以及外网
WZ-2A10-SAS5525-0938# show running-config : Saved : : Serial Number: FCH17307098 : Hardware: ASA5525 ...
- physical CPU vs logical CPU vs Core vs Thread vs Socket(翻译)
原文地址: http://www.daniloaz.com/en/differences-between-physical-cpu-vs-logical-cpu-vs-core-vs-thread-v ...
- Java调用RestFul接口
使用Java调用RestFul接口,以POST请求为例,以下提供几种方法: 一.通过HttpURLConnection调用 1 public String postRequest(String url ...
- Language Guide (proto3) | proto3 语言指南(开篇)
前言 近日在学习gRPC框架的相关知识时接触到Protobuf(protocol-buffers,协议缓冲区),proto3等知识.网上很多文章/帖子经常把gRPC与proto3放在一起,为避免初学者 ...
- Django (auth模块、User对象、用户认证、线上-用户认证)
一.auth模块 django.contrib.auth中提供了许多方法,这里主要介绍其中的三个: authenticate() 提供了用户认证,即验证用户名以及密码是否正确,一般需要usern ...
- Microsoft Exchange远程代码执行漏洞(CVE-2020-16875)
Microsoft Exchange远程代码执行漏洞(CVE-2020-16875) 漏洞信息: 由于对cmdlet参数的验证不正确,Microsoft Exchange服务器中存在一个远程执行代码漏 ...
- python--基础3(流程语句)
资源池 链接:https://pan.baidu.com/s/1OGq0GaVcAuYEk4F71v0RWw 提取码:h2sd 本章内容: if判断语句 for循环语句 while循环语句 break ...
- DEDECMS:安装百度UEDITOR编辑器
第一步:下载相对应编辑器的版本 首先,去百度搜索"百度ueditor编辑器",然后点击进入官网,找到下载页面.找到我们想要的编辑器的版本,看自己网站的编码是UTF-8还是GBK,下 ...
- 小程序navigateTo和redirectTo跳转的区别与应用
最近在做小程序的跳转,发现navigateTo的跳转无法满足业务需求,所以特地记录下 业务需求 类似一个淘宝的在订单界面选择地址的功能,从A页面点击跳转到B页面的地址列表页面,B页面可以选择已有的地址 ...
- 将jekyll博客主页的超链接变为新标签页打开
将jekyll博客主页的超链接变为新标签页打开 最近发现在打开博文查看时往往不想关闭当前页面,想新建一个页面打开,查了HTML资料以后进行修改 在根目录找到index.html,打开编辑,找到图示&l ...