话不多说,终端里的代码直接复制过来

Last login: Fri May 17 21:45:31 on ttys000

liuduoduodeMacBook-Air:~ liuxiangyang$ ssh-keygen -t rsa -C 1094435120@qq.com

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/liuxiangyang/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /Users/liuxiangyang/.ssh/id_rsa.

Your public key has been saved in /Users/liuxiangyang/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:fIKTdkyEcf/1BYr2sd2AiM7QA7TyVNqpMNbsnYrnDjg 1094435120@qq.com

The key's randomart image is:

+---[RSA 2048]----+

|     .+o+     .  |

|     o.X + o o . |

|    = B B = + o .|

|   . B % + o = +.|

|      O S . + . o|

|   . o + o       |

|  E o o          |

|   . +           |

|     .o          |

+----[SHA256]-----+

liuduoduodeMacBook-Air:~ liuxiangyang$ cd .ssh

liuduoduodeMacBook-Air:.ssh liuxiangyang$ ls -l

total 16

-rw-------  1 liuxiangyang  staff  1823  5 17 21:46 id_rsa

-rw-r--r--  1 liuxiangyang  staff   399  5 17 21:46 id_rsa.pub

liuduoduodeMacBook-Air:.ssh liuxiangyang$ cat id_rsa.pub

(此处显示的是id_rsa.pub里的内容,),把此处的内容全部复制到GitHub->右上角点击头像->settings->SSH and GPG keys->New SSH key->title填写你的注册邮箱->key为复制的内容(需要注意的是id_rsa.pub文件在.ssh文件夹下)

liuduoduodeMacBook-Air:.ssh liuxiangyang$ ssh -T git@github.com

The authenticity of host 'github.com (13.250.177.223)' can't be established.

RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

Are you sure you want to continue connecting (yes/no)? y

Please type 'yes' or 'no': yes

Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.

Hi duoudo! You've successfully authenticated, but GitHub does not provide shell access.

git连接github mac的更多相关文章

  1. WebStorm和sublime上使用git连接github(转)

    WebStorm使用git连接github的方法: 用webstorm上传代码时,首先要先下载git,网址一搜就可以搜到,安装git,并且把ssh配置到github上.然后开始配置webstorm,打 ...

  2. Git连接github以及gitee等使用教程

    Git连接github以及gitee等使用教程 一.初始化本次仓库 在想要放置仓库的文件夹出git bash输入命令 git init 二.生成ssh 在github或者gitee注册账户, 在本地生 ...

  3. 转:sublime上使用git连接github

    "工欲善其事,必先利其器." 这是古人的教诲,也是一个高效率的工程师需要遵循的法则之一.从大学开始写Java使用了JBuilder,Eclipse,后来写PHP用了Zend,写Ja ...

  4. vscode git连接github

    上一篇文章中介绍了vscode中git的简单使用方法vscode git的简单使用 上次只讲到了本地库的创建,这次说明下怎么push到github上 首先需要有一个github的账号  github官 ...

  5. git 连接github的配置

    这段时间要先在git上开发,上传代码到github上,所以首先需配置本地的git和github. 这几篇文章都不错,可以参考一下,大体的配置都很清楚. 1:https://blog.csdn.net/ ...

  6. mac下git连接github远程仓库

    git配置 一.安装git 官方网站下载安装,如果有安装homebrew,在终端输入brew install git,安装后的位置在/Users/计算机用户名目录下安装完成后,在终端输入git --v ...

  7. OS X Git连接github

    1. 运行到.local 2. cd ~/.ssh查看文件是否存在 3. ssh-keygen(创建public & private key) 4. 或者运行如下命令:cd ~/.ssh &a ...

  8. Git连接GitHub仓库详解

    [Annotation]本文将从标题八开始,因为前七个标题是关于Git的基本操作,如果对Git的基本操作不了解的话,可以点击下方链接先看一下Git怎么使用. 关于Git的详细使用 八:创建SSH Ke ...

  9. Git 连接github

    大概如下: 详细如下:如果使用本文命令,请仔细选择,因为添加一些相关命令以供参考. 1 本地仓库 1.1 创建git 仓库 git init # 初始化本地仓库 git --version # 查看G ...

随机推荐

  1. python 验证码 高阶验证

    python 验证码 高阶验证 标签: 验证码python 2016-08-19 15:07 1267人阅读 评论(1) 收藏 举报  分类: 其他(33)    目录(?)[+]   字符型图片验证 ...

  2. WebView与JavaScript交互--Android

    转载请注明出处:  http://blog.csdn.net/forwardyzk/article/details/46819925 在工作中,有一个这种需求,须要用到WebView与javascri ...

  3. cocos2d的armature绑定到其它armature骨骼上的bug

    在cocos2dx中,rmature的骨骼上能够绑定另外的armature,在我的项目中使用了该功能来完毕骑乘功能,可是在使用过程发现了例如以下的bug,特写在这里做一下记录. </span&g ...

  4. P2453 [SDOI2006]最短距离 dp

    自己想出来了!这个dp比较简单,而且转移也很简单,很自然,直接上代码就行了. 题干: 一种EDIT字母编辑器,它的功能是可以通过不同的变换操作可以把一个源串X [l..m]变换为新的目标串y[1..n ...

  5. POJ3420 递推+矩阵快速幂

    POJ3420 很有趣的覆盖问题 递归推导如下: f[n] = f[n-1] + 4*f[n-2] + 2 * [ f[n-3] + f[n-5] + f[n-7] +.... ] + 3 *  [ ...

  6. bzoj2242 [SDOI2011]计算器——BSGS

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2242 第一次写BSGS,参考了好多好多博客: 然而看到的讲解和模板是一种写法,这道题的网上题 ...

  7. SQL service 自动解决依赖包 验证

    依赖关系解决 ============================================================================================= ...

  8. 45. ExtJS ComboBox 下拉列表详细用法

    转自:https://blog.csdn.net/luckypeng/article/details/46496151 ComboBox 是ExtJS中经常用到的控件,今天我们来讲一下它的一些用法. ...

  9. 使用display:flex;实现垂直水平居中

    body,div{margin:0px;padding:0px;} .flex-container{display:flex;height:300px;background-color:#ddd;ju ...

  10. Netty编解码技术和UDP实现

    背景 作为网络传输框架,免不了传输对象,对象在传输之前就要序列化,这个序列化的过程就是编码过程.接收到编码后的数据就需要解码,还原传输的数据. 编解码技术就是java序列化技术,序列化的目的有两个,一 ...