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

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. TensorFlow 官方文档中文版

    http://wiki.jikexueyuan.com/list/deep-learning/ TensorFlow 官方文档中文版 你正在阅读的项目可能会比 Android 系统更加深远地影响着世界 ...

  2. <感悟帖>互联网与电子传统行业之经历

    依据鄙人浅显的实习.毕业工作经验以及个人思考得此文. 鄙人有幸在BAT中的B实习,以及某电子行业科研机构工作,略有心得.总结例如以下.也算是对自己的一个交待和反省. 鄙人小硕毕业211学校非985,C ...

  3. LeetCode 645. Set Mismatch (集合不匹配)

    The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of ...

  4. ref 和out的区别

    在C#语言中,参数的传递有两种,一种是值传递,一种是引用传递.ref与out这两种方式都属于引用传递,只是他们的用法稍有不同.下面看几个例子 使用ref的例子 class test { static ...

  5. discuz的全局变量

    $_G 保存了 discuz! 中所有的预处理数据 缓存能够很好的提高程序的性能,一些配置数据没必要每次都查询数据库,只要在修改了的时候更新下缓存即可. Discuz! 中所有的缓存保存在 $_G[c ...

  6. 等价表达式 2005年NOIP全国联赛提高组(栈模拟)

    P1054 等价表达式 题目描述 明明进了中学之后,学到了代数表达式.有一天,他碰到一个很麻烦的选择题.这个题目的题干中首先给出了一个代数表达式,然后列出了若干选项,每个选项也是一个代数表达式,题目的 ...

  7. 调取easyui -windows 返回值问题

    //-------------------------------------------------------------------------------------------------- ...

  8. “国家队爷”杯液体战争AI比赛!!__SymenYang

    原帖 这两天一直在搞这个AI,提供的样例更本不是我的风格啊,看不懂更不会改... 所以我自己写了一个AI的平台,现在在不断的修改AI的策略,smart样例还是很容易过的,让line的行走速度变慢一点到 ...

  9. SQL SERVER 获取给定时间段内的所有日期列表

    declare @StartDate DATETIME = '2018/08/01'declare @EndDate DATETIME ='2018/09/27'SELECT CONVERT (VAR ...

  10. [转]Android监听ListView里Button事件

    本文转自:http://blog.csdn.net/lovediji/article/details/6753349 public View getView(int position, View co ...