You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于Omnibus包搭建的本地GitLab启用Mattermost GitLab插件步骤

启用Mattermost中GitLab插件的详细步骤(Omnibus GitLab环境)

1. 确认Mattermost服务状态(Omnibus GitLab自带)

  • 编辑GitLab配置文件:sudo nano /etc/gitlab/gitlab.rb
  • 确保mattermost_external_url已配置为本地可访问地址,例如:
    mattermost_external_url 'http://mattermost.your-local-domain.com'
    
  • 保存文件后执行配置重载:sudo gitlab-ctl reconfigure
  • 访问配置的Mattermost地址,确认服务可正常登录使用

2. 在GitLab中创建OAuth应用(获取授权凭证)

  • 登录你的GitLab实例,进入管理员区域(右上角头像 → Admin Area)
  • 左侧菜单选择Settings → Applications,点击New application
  • 填写应用信息:
    • 名称:Mattermost GitLab Plugin
    • 重定向URI:http://<你的Mattermost地址>/plugins/com.github.manland.mattermost-plugin-gitlab/oauth/complete(替换为实际地址)
    • 勾选Scopes:api, read_user, read_repository, write_repository
  • 点击Save application,记录生成的Application ID和Secret

3. 安装并启用GitLab插件

  • 登录Mattermost实例,进入系统控制台(左上角菜单 → System Console)
  • 导航至Plugins → Plugin Management
    • 如果插件列表中已有GitLab,直接点击Install,完成后点击Enable
    • 如果没有,点击Upload Plugin,上传对应版本的GitLab插件包,再启用

4. 配置GitLab插件参数

  • 在Mattermost系统控制台中,进入Plugins → GitLab
  • 填写核心配置项:
    • GitLab URL:你的GitLab实例本地地址(如http://gitlab.your-local-domain.com)
    • GitLab OAuth Client ID:第二步获取的Application ID
    • GitLab OAuth Client Secret:第二步获取的Secret
    • 按需勾选Enable Private Repositories(访问私有仓库时需要)
  • 点击Save保存配置,然后重启Mattermost服务:sudo gitlab-ctl restart mattermost

5. 用户端验证与使用

  • 普通用户登录Mattermost,点击左上角菜单 → Integrations → GitLab
  • 点击Connect GitLab Account,在跳转的GitLab页面确认授权
  • 测试功能:在任意频道发送/gitlab help,验证是否返回命令帮助;或关联GitLab项目,测试代码推送、MR等通知是否正常发送到频道

内容的提问来源于stack exchange,提问作者goksungur

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 23:57:19