1. 安装:官网傻瓜式安装

2.密钥的生成:为了不让不想干的人提交代码,所以需要一个密钥

执行这个命令 :

ssh-keygen -t rsa -C "邮箱地址"

然后一直回车键回车键就可以

在第二个蓝色的框哪里就是出现密钥的存储位置

然后,登陆github,点击settings(设置)

ssh and ...

点击添加

点击add shh key。这样本地和github建立了通信基础

那么,如何配置多个呢?先配置一个。

1.  cd ~/.ssh

2.vim config

3.添加Host/HostName/User/IdentityFile  四项

Host github.com

HostName github.com

User peixm

IdentityFile  /Users/newcomer/.ssh/id_rsa(绝对路径)

以下是文件的样子:

但是多个呢?首先将id_rsa改名字,比如改成id_rsa_mine。 (mv id_rsa id_rsa_mine)

然后在进行各种的add shh key,然后将id_rsa改名成 比如 id_rsa_公司

文件的样子就是

#个人git

Host github.com

HostName github.com

User peixm

IdentityFile  /Users/newcomer/.ssh/id_rsa_mine

#公司git

Host 自己公司的名字

HostName 自己公司的地址比如(github.geo.apple.com)

User peixm

IdentityFile  /Users/newcomer/.ssh/id_rsa_公司



1. github配置的更多相关文章

  1. window下配置SSH连接GitHub、GitHub配置ssh key

    window下配置SSH连接GitHub.GitHub配置ssh key   此经验分两部分: 第一部分介绍:在windows下通过msysGit(Git for windows.Git Bash)配 ...

  2. 跟我学SpringCloud | 第六篇:Spring Cloud Config Github配置中心

    SpringCloud系列教程 | 第六篇:Spring Cloud Config Github配置中心 Springboot: 2.1.6.RELEASE SpringCloud: Greenwic ...

  3. github配置及使用

    安装git 对于linux系统,不同发行版本的安装方法不一样,请参考https://git-scm.com/download/linux.以ubuntu为例: sudo add-apt-reposit ...

  4. github配置和git学习

    参考:http://www.eoeandroid.com/thread-272837-1-1.html http://blog.csdn.net/hcbbt/article/details/11651 ...

  5. ( 转 )Github配置

    以下转自 http://liuzhijun.iteye.com/blog/1457207 有问题请联系我删除. -----———————————————————————— 如果你的代码不知道放哪里好, ...

  6. window下配置SSH连接GitHub、GitHub配置ssh key(转)

    转自:http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html 此经验分两部分: 第一部分介绍:在windows下通过msysGit ...

  7. ubuntu 14.0 下github 配置

    一:创建Repositories 1:首先在github下创建一个帐号.这个不用多说,然后创建一个Repositories. 2:然后在ubuntu下安装git相关的东东: 1 sudo apt-ge ...

  8. windows中使用Git工具连接GitHub(配置篇)

    Git在源码管理领域目前占很大的比重了,而且开源的项目很多都转到GitHub上面了.例如:jQuery, reddit, Sparkle, curl, Ruby on Rails, node.js,  ...

  9. 同一台电脑使用 gitlab 和 github 配置

    Git 客户端与服务器端的通信支持多种协议,ssh 最常用.ssh的公钥登录流程,用户将自己的公钥存储在远程主机,登录时,远程主机会向用户发送一条消息,用户用自己的私钥加密后,再发给服务器.远程主机用 ...

  10. github配置ssh密钥的方法

    配置用户名和邮箱 初次安装git需要配置用户名和邮箱,否则git会提示:please tell me who you are. 你需要运行命令来配置你的用户名和邮箱: $ git config --g ...

随机推荐

  1. zabbix模板

    https://github.com/xm-y/zabbix-community-repos  https://monitoringartist.github.io/zabbix-searcher/ 

  2. macOS & USB stick

    macOS & USB stick why macOS can only read USB stick, can not write files to USB stick macos 无法写文 ...

  3. vs code安装

    vs code是一款文本编辑器,开源,是前端界的vs,而Dreamweaver适合入门. user版本的一些系统分区文件夹无法创建,可能存在语言显示问题.一般用户建议使用system版. 下载链接:h ...

  4. LOADING Redis is loading the dataset in memory Redis javaAPI实例

    今天在实现Redis客户端API操作Jedis的八种调用方式详解中,遇到了LOADING Redis is loading the dataset in memory错误,经过多番查找资料,找到了解决 ...

  5. Eclipse配置C++时的三个关键环境变量

    ECLIPSE下载很简单,然后装上MinGW,安装就完成了,关键是要配置三个环境变量 include——C:\MinGW\include lib——C:\MinGW\lib path——C:\MinG ...

  6. table2excel使用

    原table2excel代码 /* * 采用jquery模板插件——jQuery Boilerplate * * Made by QuJun * 2017/01/10 */ //table2excel ...

  7. How to install Arch Linux

    fdisk -l mkfs.ext4 /dev/sdaX mount /dev/sdaX /mnt mkdir -p /mnt/boot/ mount /dev/sdaY /mnt/boot/ arc ...

  8. CSS边框效果

    前面的话 本文将详细介绍CSS边框效果 半透明边框 border:10px solid hsla(0, 0%, 100%,.5); background-clip:padding-box; 缝边效果 ...

  9. 14.statefulset服务

    有状态的控制器有以下几个特点 稳定,独特的网络标识符. 稳定,持久的存储. 有序,优雅的部署和扩展. 有序的自动滚动更新. 使用限制 StatefulSet是1.9之前的beta资源,在1.5之前的任 ...

  10. Go语言的接口

    一.接口的定义和好处 我们都知道接口给类提供了一种多态的机制,什么是多态,多态就是系统根据类型的具体实现完成不同的行为. 以下代码简单说明了接口的作用 package main import ( &q ...