• 1. github配置


    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_公司

     

  • 相关阅读:
    网络管理工具:Wireshark
    WAP header 信息的意义
    Visual Studio 2005 发布网站提示发布成功 但指定文件夹下没任何文件问题的解决
    Hello Win
    [转]手把手教你卸载oracle 10g
    如何识别 SQL Server 的版本
    生成insert sql脚本的存储过程
    JQuery触发事件
    PHP事务的使用方法
    PHP session和cookie
  • 原文地址:https://www.cnblogs.com/peiminer/p/9276712.html
Copyright © 2020-2023  润新知