>>> YieldNull
  • /blog
  • /archives
  • /github
  • /about

Entries tagged with Git

  • Git Push-to-Deploy Configuration

    2015-12-17 17:27:47 / Git Linux /5231 hits

    本文介绍通过搭建git服务器实现提交代码到master分支时完成网站应用代码的部署。

    创建SSH-Public-Key

    本地计算机需要创建SSH公钥与服务器通信。使用ssh-keygen生产公钥以及私钥。

    $ ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/finalize/.ssh/id_rsa): demo 
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in demo.
    Your public key has been saved in demo.pub.
    The key fingerprint is:
    6d:07:2c:56:48:aa:0d:08:ad:c1:db:ce:0f:bf:4e:6b finalize@junjie
    The key's randomart image is:
    +--[ RSA 2048]----+
    |o.     ....      |
    |.o..   ..o       |
    | o+ . . o o      |
    |.. . + . o .     |
    |  o . . S o .    |
    |   +     . .     |
    |    +.           |
    |    .E.          |
    |    o+.          |
    +-----------------+
    

    然后在ssh的配置文件中加入demo.pub的配置

    $ vi ~/.ssh/config
    $ chmod 600 ~/.ssh/config
    

    Read more...


  • « Previous
  • Next »

About this site © YieldNull,