git 生成 sshkey
2016-07-16 12:13
483 查看
git config --global user.name "YourName"
git config --global user.email "YourEmail"
ssh-keygen -t rsa -C “YourEmail”
三个回车
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kaixuan/.ssh/id_rsa):
Created directory '/home/kaixuan/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/kaixuan/.ssh/id_rsa.
Your public key has been saved in /home/kaixuan/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:Cg+b557Wr1kQtbGd5FaInk0ssrvnSrxNUgnznvrVan8 “likaixuan@newborn-town.com”
The key's randomart image is:
+---[RSA 2048]----+
| oo... |
| ..oB+o |
| ++o== |
| .=oo. |
| o S.+ |
| * o.+ . . |
| o +.+.= . . |
| o.ooO.... E|
| o+ *B=..... |
+----[SHA256]-----+
成功------------------------------------------------
生成的文件 位于/home/user/.ssh 目录
然后将生成的 id_rsa.pub 添加到github
ssh git@github.com
PTY allocation request failed on channel 0
Hi kaixuangh! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
成功
然后 git clone ------- 就可以正常使用啦
git config --global user.email "YourEmail"
ssh-keygen -t rsa -C “YourEmail”
三个回车
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kaixuan/.ssh/id_rsa):
Created directory '/home/kaixuan/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/kaixuan/.ssh/id_rsa.
Your public key has been saved in /home/kaixuan/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:Cg+b557Wr1kQtbGd5FaInk0ssrvnSrxNUgnznvrVan8 “likaixuan@newborn-town.com”
The key's randomart image is:
+---[RSA 2048]----+
| oo... |
| ..oB+o |
| ++o== |
| .=oo. |
| o S.+ |
| * o.+ . . |
| o +.+.= . . |
| o.ooO.... E|
| o+ *B=..... |
+----[SHA256]-----+
成功------------------------------------------------
生成的文件 位于/home/user/.ssh 目录
然后将生成的 id_rsa.pub 添加到github
ssh git@github.com
PTY allocation request failed on channel 0
Hi kaixuangh! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
成功
然后 git clone ------- 就可以正常使用啦
相关文章推荐
- Beego xsrf处理
- JAVA加密类型和算法名称
- 魔术师发牌问题2
- 最大似然估计
- 食品、能量与人体健康
- webView js交互
- Java 8中一些常用的全新的函数式接口
- 从内存角度解析Java字符编码
- svn重启问题
- 魔术师发牌问题
- Spring IOC注入(三)自动注入
- 【leetcode】66. Plus One
- [译]FaceBook出品:基于Android的内存优化
- 黑白子交换问题
- u-boot2013.01 smdk2410 启动第二阶段分析
- IDE-Sublime【3】-配置Node.js开发环境
- 哥德巴赫猜想
- J2EE进阶(五)Spring在web.xml中的配置
- J2EE进阶(五)Spring在web.xml中的配置
- git # 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支 # 合并到主题分支。