ubuntu-server-14-04:git-server
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
ubuntu-server-14-04:git-server [2015/01/07 21:53] – [モジュールを有効化] admin | ubuntu-server-14-04:git-server [2015/01/07 22:50] (現在) – admin | ||
---|---|---|---|
行 49: | 行 49: | ||
</ | </ | ||
+ | Apache2 のサイトの設定を変更する。[[apache2-ssl|以前作成]]した、SSL を使用するサイトの < | ||
+ | * / | ||
< | < | ||
- | | + | SetEnv GIT_PROJECT_ROOT / |
- | SSLOptions +StrictRequire | + | AliasMatch ^/ |
- | | + | AliasMatch ^/ |
- | | + | ScriptAlias /git/ / |
- | AuthName "Webdav" | + | |
- | AuthUserFile / | + | < |
- | Require valid-user | + | |
+ | SSLOptions +StrictRequire | ||
+ | AuthType Basic | ||
+ | AuthName "Git Authentication" | ||
+ | AuthUserFile / | ||
+ | Require valid-user | ||
+ | </ | ||
</ | </ | ||
行 67: | 行 76: | ||
</ | </ | ||
+ | Apache2 を再起動する。 | ||
- | テスト用のリポジトリを作成 | + | < |
+ | $ sudo service apache2 restart | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== テスト用のリポジトリを作成 | ||
+ | |||
+ | テスト用にリポジトリを作成する。 | ||
< | < | ||
行 76: | 行 93: | ||
$ cd ./test.git/ | $ cd ./test.git/ | ||
$ sudo git init --bare | $ sudo git init --bare | ||
- | Initialized empty Git repository in / | ||
- | $ sudo touch ./ | ||
- | $ sudo cp ./ | ||
$ sudo git config http.receivepack true | $ sudo git config http.receivepack true | ||
$ sudo git update-server-info | $ sudo git update-server-info | ||
+ | $ sudo touch ./ | ||
+ | $ sudo cp ./ | ||
$ sudo chown -R www-data: | $ sudo chown -R www-data: | ||
</ | </ | ||
+ | |||
+ | クライアントからアクセスし、Git にアクセスできるかを確認する。 | ||
+ | |||
===== 参考 ===== | ===== 参考 ===== |
ubuntu-server-14-04/git-server.1420635227.txt.gz · 最終更新: 2015/01/07 21:53 by admin