リポジトリ作成

気がつけば、またしばらくエントリしてなかった。
今更ながらGit触ってみました設定だけならsvnより楽でした。

リポジトリの作成

share $ cd sandbox.git/
sandbox.git $ git --bare init
Initialized empty Git repository in /var/www/vhosts/example.com/htdocs/share/sandbox.git/
sandbox.git $ git update-server-info
sandbox.git $ touch git-daemon-export-ok
sandbox.git $ chown -R apache:apache .

Apacheの設定

<VirtualHost 192.168.1.5:80 >
  DocumentRoot /var/www/vhosts/example.com/htdocs
  ServerName example.com
  UseCanonicalName On
  <IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
  </IfModule>
  <Directory /var/www/vhosts/example.com/htdocs >
    Options FollowSymLinks
    Order allow,deny
    Allow from all
  </Directory>
  <Location /share/>
    Options Indexes
    DAV on
    <LimitExcept GET PROPFIND OPTIONS REPORT>
      Require valid-user
      AuthType Basic
      AuthName "catlet password"
      AuthUserFile /var/www/vhosts/example.com/.repo-users
    </LimitExcept>
    Order allow,deny
    Allow from all
  </Location>
  ErrorLog /var/log/httpd/example.com-error_log
  CustomLog /var/log/httpd/example.com-access_log common
</VirtualHost>