redmineとGitLabの連携について

840 views
Skip to first unread message

hidek...@gmail.com

unread,
Jan 25, 2017, 7:23:48 AM1/25/17
to Redmine Users (japanese)
皆さん、はじめまして。

現在、redmineとGitLabを連携させようと設定を進めています。

redmine、GitLabは以下のような構成です。

----------------------------------------
[redmine]
redmine-3.2.2
nginx version: nginx/1.11.1
git version 1.8.3.1
ruby 2.0.0p598

===========================

[redmine plugin]
Advanced roadmap & milestones plugin : 0.10.1
Redmine Github Hook plugin : 2.2.0
Knowledgebase : 3.2.0
Redmine Work Time plugin : 0.3.2

==========================

[gitlab]
GitLab Community Edition 8.15.2

----------------------------------------

redmineにプラグインとして「Redmine Github Hook plugin」をインストールし、
ローカルディレクトリ内に、bareリポジトリを作成しました。

また、GitLabのほうでは、redmine用の公開鍵を登録し、WebHockの設定などを
実施しました。

しかし、GitLabのリポジトリにプッシュがあってもredmineのリポジトリが更新されない状態です。
チケットのリビジョンも更新されません。

redmineの「production.log」を確認したところ、どうやら鍵認証(Permission denied)で
失敗しているように見えます。

production.log
-----------------------------------------
  Current user: anonymous
  GithubHook: Command 'git fetch origin' didn't exit properly. Full output: ["Pe
rmission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "fatal: Could no
t read from remote repository.\n", "\n", "Please make sure you have the correct
access rights\n", "and the repository exists.\n"]
-----------------------------------------

「ssh-add」など色々と試しているのですが、一向に改善できません。

どなたか、考えられる原因や、調査観点、解決方法をご教示ください。
よろしくお願いいたします。

ちなみにredmineにある秘密鍵はrootのホームディレクトリ配下の「.ssh」ディレクトリに
保存しています(unicorn_railsプロセスがrootで稼動していたため。)。

unicorn_railsプロセス確認
-----------------------------------------
root     26689  0.0  6.7 492928 126860 ?       Ssl  19:44   0:04 unicorn_rails master -c config/unicorn.rb -E production
root     26695  0.0  7.7 519020 146912 ?       Sl   19:44   0:01 unicorn_rails worker[0] -c config/unicorn.rb -E production
root     26697  0.0  8.0 523432 152100 ?       Sl   19:44   0:01 unicorn_rails worker[1] -c config/unicorn.rb -E production
-----------------------------------------

hidek...@gmail.com

unread,
Feb 5, 2017, 10:18:31 AM2/5/17
to Redmine Users (japanese)
自己解決しました。

rootユーザーのホームディレクトリにある「.ssh/」ディレクトリ配下でconfigファイルを作り、
そこに適切な値を設定した所、うまくいきました。

fetchするとき、~/.ssh/configに使用する秘密鍵や、ログインユーザ(git)を設定しないと
失敗するようです。

お騒がせしました.

2017年1月25日水曜日 21時23分48秒 UTC+9 hidek...@gmail.com:
Reply all
Reply to author
Forward
0 new messages