1. 生成你的ssh-key
    1. $ ssh-keygen -t rsa -b 4096 -C  "SaphhireCastle@163.com"
    2. 默认目录为:/Users/you/id_rsa_email 多key好区分
    3. 输入passphrase,统一123456
  2. 将key加入agents中
    1. $ ssh-add ~/.ssh/id_rsa_SapphireCastle
    2. 查看现有key: $ ssh-add -l
    3. 删除key: $ssh-add -D
    4. 查询ssh-agents版本:ssh-add -v
    5. 打开/关闭ssh:$ sudo systemsetup  -setremotelogin on/off
  3. github服务器加入公匙
    1. 复制本地公匙 $ cat  ~/.ssh/id_rsa_SapphireCastle.pub
    2. GITHUB -> Settings -> SSH and GPG keys -> New SSH key
  4. 验证是否连通
    1. $ ssh -T git@github.com   此处为config中配置的host

多用户使用ssh登录

#default github user(SapphireCastle | SapphireCastle@.com)

Host github.com

  HostName github.com

  PreferredAuthentications publickey

  IdentityFile ~/.ssh/id_rsa_sapphirecastle

#other github user(TigerEatGrass | lijianzhi01@gmail.com)

Host teg.github.com

  HostName github.com

  PreferredAuthentications publickey

  IdentityFile ~/.ssh/id_rsa_lijianzhi01

Git-ssh登录github的更多相关文章

  1. git ssh登录

    .ssh下创建config文件 其内容: Host ipIdentityFile ~/.ssh/私钥文件名Port 22User git服务器的账号,不是git账号名(私钥文件名才是git账号名) 注 ...

  2. eclipse 配置git ssh登录

    实现需要安装git的插件,由于我使用的adt和eclipse for javaee版本两个,都已经安装了git插件,就不再演示了,网上都有. 这篇文章主要是介绍使用ssh进行认证的方式. 1.首先,配 ...

  3. Git:与GitHub搭配及SSH登录

    远程库(GitHub)上的地址 搭建本地库 准备一个文件 将地址用别名存在git上 推送到远程库 克隆 克隆的效果 1)完整的把远程库下载到本地 2)别名也完整保留 3)同时也初始化了本地库 邀请团队 ...

  4. SSH方式登录github出现Permission denied (publickey)

    今天在公司上传了代码,回到家pull,结果竟然出现了“Permission denied (publickey)“这种东西.第一反应是key不对,可是上次明明用key登录过,不可能不对啊,难道是文件被 ...

  5. 怎样配置git ssh连接,怎样在GitHub上加入协作开发人员,怎样配置gitignore和怎样在GitHub上删除资源库.

    **********1.在运行git push origin master指令时报例如以下错误: iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master ...

  6. (2)git本地生成SSH关联github

    1.安装git 2.打开 Git Bash 输入ssh ,查看是否安装了ssh 这个界面是安装了的意思 3.生成ssh 输入ssh-keygen -t rsa 指令, 再连续按三次回车 会生成两个文件 ...

  7. git + idea 配置 github设置ssh免登陆方式提交拉取代码

    1.下载安装git,官网:https://git-scm.com/download/win  安装默认配置安装 git2.20版本地址百度网盘地址: 链接:https://pan.baidu.com/ ...

  8. github免输用户名/密码SSH登录的配置

    从github上获取的,自己整理了下,以备后用. Generating an SSH key mac windows SSH keys are a way to identify trusted co ...

  9. git配置ssh(github)

    [参考官方文档] SSH keys are a way to identify trusted computers, without involving passwords. The steps be ...

  10. git ssh key for github

    第一:检查.ssh是否存在(ls -al ~/.ssh) $ ls -al ~/.ssh Lists the files in your .ssh directory, if they exist 第 ...

随机推荐

  1. TF-IDF与主题模型 - NLP学习(3-2)

    分词(Tokenization) - NLP学习(1) N-grams模型.停顿词(stopwords)和标准化处理 - NLP学习(2) 文本向量化及词袋模型 - NLP学习(3-1) 在上一篇博文 ...

  2. vim字符编码

    今天我在用vim新建中文文件的时候遇到保存好出现乱码的问题,经过一波百度, :set encoding=utf-8 :set fileencodings=ucs-bom,utf-8,cp936 :se ...

  3. 入口文件-npm run dev

    如果你是用vue.js官网提供的脚手架工具并沿用默认配置的话,你执行npm run dev的时候会出来页面,是因为你根目录下的package.json文件里script配置了"dev&quo ...

  4. Flink History Job

    history job的写入1. org.apache.flink.runtime.jobmanager,Object JobManagerrunJobManager中指定使用MemoryArchiv ...

  5. Java基础知识-去重

    java基础知识-去掉list集合中的重复元素: 思路: 首先新建一个容器resultList用来存放去重之后的元素 然后遍历sourceList集合中的元素 判断所遍历的元素是否已经存在于resul ...

  6. delphi如何模块内部获得自身路径ExtractFilePath和paramstr(0)

    如何模块内部获得自身路径?Exe程序:DLL程序: ExtractFilePath(Application.ExeName) GetCurrentDir TIniFile.Create(GetCurr ...

  7. SpringBoot2.0

    建立可执行的Jars和Wars bootJar用于构建可执行的Jar: bootWar用于构建可执行的war. application.properties 不启动web服务器 spring.main ...

  8. mac --snip 滚动截屏

    1.snip 下载配置:https://jingyan.baidu.com/article/fec4bce2458d03f2618d8b8e.html 2.mac的火狐浏览器好像不支持,必须在sofa ...

  9. MySQL里执行SHOW INDEX结果中Cardinality的含义

    今天在写一个Perl脚本,想自动化查找出MySQL数据库中可能无效的索引,于是根据朝阳的书上提到的一些规则,我来设计了一些判断方法,其中发现某个我想要的值就是SHOW INDEX FROM table ...

  10. codeforces803D. Magazine Ad

    D. Magazine Adtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutput ...