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

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. UVA - 10324 Zeros and Ones

    Description Given a string of 0's and 1's up to 1000000 characters long and indices i and j, you are ...

  2. HDU 5325 Crazy Bobo(思路+dfs 记忆化)

    Crazy Bobo Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Tota ...

  3. 通过代码获取log4net的文件路径

    http://stackoverflow.com/questions/1343749/get-log4net-log-file-in-c-sharp Solution is quite easy in ...

  4. mysql创建用户,并授予权限

    mysql> GRANT ALL PRIVILEGES ON *.* TO jiqing@"%" IDENTIFIED BY '123456'; Query OK, 0 ro ...

  5. allonsy

    时间限制 1s 空间限制 512MB 2.1 题目描述 "Allons-y!" 时间还算足够,好好看看题吧. 有一种说法,时间线是扭曲的,会相互交织.(一般在科幻片里比较流行?) ...

  6. 02_jni_hello_c函数介绍

    介绍NDK平台都有哪些工具.通过NDK这套工具做安卓下的JNI开发. 可能有一些需求更适合通过C去做,有一些功能要通过C去实现.一个安卓程序,它本身还是一个Java应用.有一些功能/方法不通过Java ...

  7. zookeeper单机安装

    安装zookeeper步骤: 1,下载zookeeper http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.14/ 2,放到合适目录,解压 ...

  8. 【TODO】Ruby Range类

    创建: 2017/10/28   Range类                                                                             ...

  9. E20171015-hm

    quirk   n. 怪癖; 奇事,巧合; 突然的弯曲; propagation  n. 宣传; 传播,传输,蔓延,扩展,波及深度; [生]繁殖法,[地]传导; 培养; immediate  adj. ...

  10. Decode the Strings

    http://acm.hdu.edu.cn/showproblem.php?pid=2371 题意:给出一个长度为n的字符串(标号为1~n),以及n个数代表字符串的变换规则,问该字符串是由哪个字符串按 ...