Windows上でGitリポジトリをリモートからアクセスできる環境を用意するのは結構大変です。
Gitblit GOというツールがhttp/httpsプロトコルによるGitサーバーがWindowsで動くと知って試してみました。
Javaで書かれてTomcatを同梱しています。
Gitblit GOをWindows上で動かす
まず、Gitblitの公式サイトにいって、"Download Gitblit GO (Windows)"ボタンをクリックします。
http://gitblit.com/
すると、gitblit-1.3.1.zipがダウンロードされます。
適当なディレクトリ(例、C:\tools\gitblit-1.3.1)の下にダウンロードしたzipの内容を解凍します。
設定ファイルが、解凍したディレクトリ下のdata\gitblit.propertiesにあるのでエディタで編集します。以下が変更行です。
server.httpPort = 80
コマンドプロンプトで実行します。
C:\> cd \tools\bitblit-1.3.1 C:\tools\bitblit-1.3.1> gitblit.cmd INFO *********************************************************** INFO _____ _ _ _ _ _ _ INFO | __ \(_)| | | | | |(_)| | INFO | | \/ _ | |_ | |__ | | _ | |_ INFO | | __ | || __|| '_ \ | || || __| INFO | |_\ \| || |_ | |_) || || || |_ INFO \____/|_| \__||_.__/ |_||_| \__| INFO Gitblit v1.3.1 INFO INFO *********************************************************** INFO Running on Windows 7 (6.1) INFO Setting up NIO SelectChannelConnector on port 80 WARN Binding connector on port 80 to localhost INFO Using JCE Standard Encryption Policy files, encryption key lengths will be limited INFO Generating Gitblit Certificate Authority (C:\tools\gitblit-1.3.1\data\cert s\caKeyStore.p12) INFO Generating Gitblit Certificate Authority CRL (C:\tools\gitblit-1.3.1\data\ certs\caRevocationList.crl) INFO Generating SSL certificate for localhost signed by Gitblit Certificate Aut hority (C:\tools\gitblit-1.3.1\data\serverKeyStore.jks) INFO Importing Gitblit Certificate Authority into trust store (C:\tools\gitblit -1.3.1\data\serverTrustStore.jks) INFO allowing SSL renegotiation on Java 1.7.0_25 INFO certificate alias = localhost INFO keyStorePath = C:\tools\gitblit-1.3.1\data\serverKeyStore.jks INFO trustStorePath = C:\tools\gitblit-1.3.1\data\serverTrustStore.jks INFO crlPath = C:\tools\gitblit-1.3.1\data\certs\caRevocationList.crl INFO Setting up NIO SslSelectChannelConnector on port 8443 WARN Binding ssl connector on port 8443 to localhost INFO Gitblit base folder = C:\tools\gitblit-1.3.1\data INFO Git repositories folder = C:\tools\gitblit-1.3.1\data\git INFO Gitblit settings = C:\tools\gitblit-1.3.1\data\gitblit.properties INFO Identifying available repositories... INFO 0 repositories identified with calculated folder sizes in 7 msecs INFO JVM timezone is Asia/Tokyo (JST +0900) INFO Gitblit timezone is Asia/Tokyo (JST +0900) INFO Setting up user service GitblitUserService INFO GUS delegating to ConfigUserService(C:\tools\gitblit-1.3.1\data\users.conf) WARN Mail server is not properly configured. Mail services disabled. INFO Lucene executor is scheduled to process indexed branches every 2 minutes. WARN Federation passphrase is blank! This server can not be PULLED from. INFO Git Daemon is listening on 127.0.0.1:9418 INFO preparing 14 day commit cache. please wait... INFO 0 repositories identified with calculated folder sizes in 0 msecs INFO built 14 day commit cache of 0 commits across 0 repositories in 2 msecs INFO Shutdown Monitor listening on port 8081 INFO jetty-7.6.8.v20121106 INFO Extract jar:file:/C:/tools/gitblit-1.3.1/gitblit.jar!/ to C:\tools\gitblit -1.3.1\data\temp\webapp INFO NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet INFO started o.e.j.w.WebAppContext{/,file:/C:/tools/gitblit-1.3.1/data/temp/web app/},file:/C:/tools/gitblit-1.3.1/gitblit.jar INFO [GitBlitWebApp] init: Wicket core library initializer INFO [GitBlitWebApp] init: Wicket extensions initializer INFO [GitBlitWebApp] Started Wicket version 1.4.21 in deployment mode INFO Started SelectChannelConnector@localhost:80 INFO Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2He llo, SSLv3, TLSv1, TLSv1.1, TLSv1.2] INFO Started SslSelectChannelConnector@localhost:8443