ホームページのバージョン管理するよ

これを外部向けに公開して、gitでやる

git レポジトリを作成

cd /var/www
mkdir -p git/bw.git
chown apache:apache -R git
cd git/bw.git
git init --bare --shared
git update-server-info


/etc/httpd/conf/httpd.confないにあるのでそのまま利用


# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb

/etc/httpd/conf.d/git.confファイルを作成して以下の内容にする。


ServerName hogehoge.foobar.com
DocumentRoot /var/www/git

SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/certs/server.key


DAV on
SSLRequireSSL
AuthType Basic
AuthName "git repository"
AuthUserFile /var/www/git/.htpasswd
Require valid-user


アカウント作成

htpassword - c /var/www/git/.htpasswd アカウント

git cloneするときに自己認証のためsslのチェックをしない
環境変数をONにする

GIT_SSL_NO_VERIFY=true git clone https://hogehoge.foobar.com/bw.git