如何在源代码安装中将配置数据添加到gitlab?(How to add configuration data to gitlab on source install?)

编程入门 行业动态 更新时间:2024-10-28 20:22:09
如何在源代码安装中将配置数据添加到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文件。

我如何将mattermost的配置添加到从源代码安装而不是由omnibus软件包安装的gitlab实例中?

我可以编辑哪些文件以及什么是rake命令来加载这些文件?

I need to follow certain instructions in gitlab. Those gitlab instructions are -

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.

I am currently running a source install of gitlab and I do NOT have the /etc/gitlab/gitlab.rb file available to me.

How would I add the configuration for mattermost in a gitlab instance that is installed from source and not by the omnibus package?

What files do I edit and what is the rake command to load those files?

最满意答案

我在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" },

要获取令牌,请在gitlab中 -

以管理员身份登录 转到配置文件设置 转到应用程序 在此添加mattermost应用程序的标记,并使用此数据在mattermost中填写配置文件。

I entered the gitlab config at mattermost/config/config.json and updated my settings with the appropriate endpoints as well as secret and ID. The correct information needed came from the gitlab gui. I created the tokens within gitlab proper and plugged the information into mattermost. I also had to edit my /etc/hosts due to the way our network is but this should not be necessary for most users.

"GitLabSettings": { "Enable": true, "Secret": "abc123", "Id": "abc123", "Scope": "", "AuthEndpoint": "http://gitlab/oauth/authorize", "TokenEndpoint": "http://gitlab/oauth/token", "UserApiEndpoint": "http://gitlab/api/v3/user" },

To get to the token, inside gitlab -

Login as an admin Go to profile settings Go to applications Add the token for the mattermost application here and use this data to fill out the config file in mattermost.

更多推荐

本文发布于:2023-08-05 04:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428418.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中将   源代码   数据   如何在   gitlab

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!