LoginSignup
1

More than 5 years have passed since last update.

`git push` でHetemlに公開

Last updated at Posted at 2015-02-24
  1. heteml管理画面でsshアカウントを作成
  2. 発行されたアカウント情報でsshログインする
  3. 適宜ディレクトリを移動してsite.gitなど適当なレポジトリ格納用ディレクトリを作る
  4. 上述のディレクトリ(/site.git/)に移動してgit init --bare
  5. /site.git/hooks/へ移動してtouch post-receive
  6. vim post-receiveで以下記述

    #!/bin/sh
    git --work-tree=/path/to/yoursite --git-dir=/path/to/yoursite/  site.git checkout -f
    
    
  7. この時/path/to/yoursitepwdで調べたものを入れる(userとしてのルートからのパスは違う)

  8. chmod +x post-receiveで権限を変更

  9. リモートレポジトリにssh://yourusername@ssh***.heteml.jp:2222/path/to/yoursite/site.gitを登録(***には1で発行したサーバー情報を入れる)

秘密鍵の登録とかその辺はやってないので逐次パスを聞かれて若干うるさい。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1