LoginSignup
1
1

More than 5 years have passed since last update.

GitBucketにて作成したGitレポジトリをRedmineで参照(Windows Server 2012)

Posted at

ひとまず勢いでメモ書き。

以下の手順に従い、Redmine(Bitnami)+GitBucket(Tomcat)をインストール。
http://kuttsun.blogspot.jp/2016/04/gitbucket.html

GitBucketにて作成したGitレポジトリをRedmineで参照すると404エラーになり表示できない。
redmine_bitbucketgit_hookもバージョンが合わないせいか、正常に動作しない。

Windows環境でGitBucketを動かしている場合、GitBucketのデータは以下の場所に保存される。

ログイン中のユーザーで実行した場合
C:\Users[ユーザー名].gitbucket
サービスとして登録した場合
C:\Windows\System32\config\systemprofile\.gitbucket

今回、Tomcatでサービスとして登録しており、C:\Windows\System32以下に配置されていた。

production.log
Shelling out: "C:\Bitnami\redmine\git\bin\git.exe" --version --no-color
Shelling out: "C:\Bitnami\redmine\git\bin\git.exe" "--git-dir" "C:\Windows\System32\config\systemprofile\.gitbucket\repositories\makin\study.git" "-c" "core.quotepath=false" "-c" "log.decorate=no" "branch" "--no-color" "--verbose" "--no-abbrev"

Shelling out: "C:\Bitnami\redmine\git\bin\git.exe" "--git-dir" "C:\Windows\System32\config\systemprofile\.gitbucket\repositories\makin\study.git" "-c" "core.quotepath=false" "-c" "log.decorate=no" "ls-tree" "-l" "HEAD:"

ログに載っていた上記コマンドを実行するとエラー。
C:\Windows\System32以下のフォルダが見つからず、同フォルダを別のパスにコピーして検証すると動作。

解決方法

C:\Windows\System32以下のフォルダのシンボリックリンクを作成する。

cmd
cd c:\Git
mklink /D .gitbucket C:\Windows\System32\config\systemprofile\.gitbucket

Redmineのレポジトリはシンボリックリンクのアドレスを指定する。
リポジトリ
C:\Git\.gitbucket\repositories\makin\study.git

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1