Help us learn about your current experience with the documentation. Take the survey.
Webhook 管理 Rake 任务
- 版本:Free, Premium, Ultimate
- 产品:GitLab Self-Managed
GitLab 提供了用于管理 Webhook 的 Rake 任务。
管理员可以允许或阻止 Webhook 对本地网络的请求。
为所有项目添加 Webhook
要为所有项目添加 Webhook,请运行:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook"
# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" RAILS_ENV=production为命名空间下的项目添加 Webhook
要为特定命名空间下的所有项目添加 Webhook,请运行:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace>
# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production从项目中移除 Webhook
要从所有项目中移除 Webhook,请运行:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook"
# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" RAILS_ENV=production从命名空间下的项目中移除 Webhook
要从特定命名空间下的项目中移除 Webhook,请运行:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace>
# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production列出所有 Webhook
要列出所有 Webhook,请运行:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list
# source installations
bundle exec rake gitlab:web_hook:list RAILS_ENV=production列出命名空间下项目的 Webhook
要列出指定命名空间下项目的所有 Webhook,请运行:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list NAMESPACE=<namespace>
# source installations
bundle exec rake gitlab:web_hook:list NAMESPACE=<namespace> RAILS_ENV=production