Redmine works with git repository on github.com

投稿者 okkez 2009-02-15 04:02:00 GMT

github にある git リポジトリと自分で建ててる Redmine とを連携させてみる。

最初の一歩は公式の Redmine - RedmineRepositories - Redmine に載ってるので簡単。

$ cd /path/to/redmine
$ sudo mkdir git_repositories
$ sudo chmod ... # 権限を調整する
$ cd git_repositories
$ git clone --bare git://github.com/<your_name>/<your_repo_name>.git
$ cd <your_repo_name>
## ここからがポイント。
$ git --bare remote add origin git://github.com/<your_name>/<your_repo_name>.git
$ git --bare fetch

ポイントは git clone –bare が git clone と違って自動的に remote を登録してくれないこと。 これを手動で登録すれば OK。 もちろん config ファイルを自分で編集しても大丈夫。

あとは cron なり、何なりで fetch すればいいはず。

Redmine のリポジトリには今、作成した bare リポジトリのフルパスを指定すれば OK 。

追記 (2008-02-22)

以前、書いた部分がちょっと不十分だったようなので追記。

以下のようにしないと、ちゃんと反映されないみたい。

$ git --bare fetch git_repo_path master:master

カテゴリ ,  | タグ ,  | コメントなし | トラックバックなし

コメント

トラックバック

トラックバックリンク:
http://typo.okkez.net/trackbacks?article_id=234

コメントは許可されていません