如何在源安装时将配置数据添加到gitlab?
How to add configuration data to gitlab on source install?
我需要遵循 gitlab 中的某些说明。这些 gitlab 指令是 -
Manually (re)authorising GitLab Mattermost with GitLab
Authorise GitLab Mattermost
To do this, using browser navigate to the admin area of GitLab, Application section. Create a new application and for the callback URL use: http://mattermost.example.com/signup/gitlab/complete and http://mattermost.example.com/login/gitlab/complete (replace http with https if you use https).
Once the application is created you will receive an Application ID and Secret. One other information needed is the URL of GitLab instance.
Now, go to the GitLab server and edit the /etc/gitlab/gitlab.rb configuration file.
In gitlab.rb use the values you've received above:
mattermost['gitlab_enable'] = true
mattermost['gitlab_id'] = "12345656"
mattermost['gitlab_secret'] = "123456789"
mattermost['gitlab_scope'] = ""
mattermost['gitlab_auth_endpoint'] = "http://gitlab.example.com/oauth/authorize"
mattermost['gitlab_token_endpoint'] = "http://gitlab.example.com/oauth/token"
mattermost['gitlab_user_api_endpoint'] = "http://gitlab.example.com/api/v3/user"
Save the changes and then run sudo gitlab-ctl reconfigure.
If there are no errors your GitLab and GitLab Mattermost should be configured correctly.
我目前是 运行 gitlab 的源代码安装,但我没有可用的 /etc/gitlab/gitlab.rb 文件。
如何在从源代码而不是 omnibus 包安装的 gitlab 实例中添加 mattermost 的配置?
我要编辑哪些文件以及加载这些文件的 rake 命令是什么?
我在 mattermost/config/config.json 输入了 gitlab 配置,并使用适当的端点以及秘密和 ID 更新了我的设置。所需的正确信息来自 gitlab gui。我在 gitlab 中创建了令牌并将信息插入 mattermost。由于我们的网络状况,我还必须编辑我的 /etc/hosts,但这对大多数用户来说不是必需的。
"GitLabSettings": {
"Enable": true,
"Secret": "abc123",
"Id": "abc123",
"Scope": "",
"AuthEndpoint": "http://gitlab/oauth/authorize",
"TokenEndpoint": "http://gitlab/oauth/token",
"UserApiEndpoint": "http://gitlab/api/v3/user"
},
获取token,在gitlab里面-
- 以管理员身份登录
- 转到配置文件设置
- 转到应用程序
- 在此处添加 mattermost 应用程序的令牌,并使用此数据填写 mattermost 中的配置文件。
我需要遵循 gitlab 中的某些说明。这些 gitlab 指令是 -
Manually (re)authorising GitLab Mattermost with GitLab
Authorise GitLab Mattermost
To do this, using browser navigate to the admin area of GitLab, Application section. Create a new application and for the callback URL use: http://mattermost.example.com/signup/gitlab/complete and http://mattermost.example.com/login/gitlab/complete (replace http with https if you use https).
Once the application is created you will receive an Application ID and Secret. One other information needed is the URL of GitLab instance.
Now, go to the GitLab server and edit the /etc/gitlab/gitlab.rb configuration file.
In gitlab.rb use the values you've received above:
mattermost['gitlab_enable'] = true
mattermost['gitlab_id'] = "12345656"
mattermost['gitlab_secret'] = "123456789"
mattermost['gitlab_scope'] = ""
mattermost['gitlab_auth_endpoint'] = "http://gitlab.example.com/oauth/authorize"
mattermost['gitlab_token_endpoint'] = "http://gitlab.example.com/oauth/token"
mattermost['gitlab_user_api_endpoint'] = "http://gitlab.example.com/api/v3/user"
Save the changes and then run sudo gitlab-ctl reconfigure.
If there are no errors your GitLab and GitLab Mattermost should be configured correctly.
我目前是 运行 gitlab 的源代码安装,但我没有可用的 /etc/gitlab/gitlab.rb 文件。
如何在从源代码而不是 omnibus 包安装的 gitlab 实例中添加 mattermost 的配置?
我要编辑哪些文件以及加载这些文件的 rake 命令是什么?
我在 mattermost/config/config.json 输入了 gitlab 配置,并使用适当的端点以及秘密和 ID 更新了我的设置。所需的正确信息来自 gitlab gui。我在 gitlab 中创建了令牌并将信息插入 mattermost。由于我们的网络状况,我还必须编辑我的 /etc/hosts,但这对大多数用户来说不是必需的。
"GitLabSettings": {
"Enable": true,
"Secret": "abc123",
"Id": "abc123",
"Scope": "",
"AuthEndpoint": "http://gitlab/oauth/authorize",
"TokenEndpoint": "http://gitlab/oauth/token",
"UserApiEndpoint": "http://gitlab/api/v3/user"
},
获取token,在gitlab里面-
- 以管理员身份登录
- 转到配置文件设置
- 转到应用程序
- 在此处添加 mattermost 应用程序的令牌,并使用此数据填写 mattermost 中的配置文件。