LoginSignup
6
2

More than 5 years have passed since last update.

Proxy配下のGitLabでWebHookを飛ばす

Posted at

Proxy配下のGitLabでWebHookを飛ばす

※この記事は私のブログにも掲載しています。

直接インターネットに出られない環境に構築されたGitLabだとWebHookが使えません。
Proxy経由で出られるようにします。

OSの場合だと環境変数に http_proxyhttps_proxy を設定するとproxyが利用されますが、GitLabはこの設定を見ていないようです。
なので /etc/gitlab/gitlab.rb に設定を追記します。

デフォルトのgitlab.rbだと gitlab_rails['env'] がコメントアウトされていると思うので、コメントアウトを解除して http_proxyhttps_proxy を設定します。

gitlab_rails['env'] = {
  'http_proxy'  => 'http://host:port/',
  'https_proxy' => 'http://host:port/'
}

あとは gitlab-ctl reconfigure を実行して設定を反映させるとGitLab上からProxyを経由してWebHookを送信することができます。

x. 参考

6
2
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
6
2