gpt4 book ai didi

gitlab - 如何让gitlab使用与git不同的用户?

转载 作者:行者123 更新时间:2023-12-01 16:42:24 24 4
gpt4 key购买 nike

我试图让 gitlab 以不同的用户运行,但我找不到任何配置此配置的地方。

我尝试了这个,因为我需要使用 NIS 帐户来运行它,事实上我什至删除了 git 本地用户,在 NIS 上创建了一个用户并尝试像这样重新启动它(在修复了由于 UID 和 GID 导致的所有权之后)更改)。

STDERR: usermod: user 'git' does not exist in /etc/passwd
---- End output of ["usermod", "-g", "10032", "-s", "/bin/sh", "git"] ----
Ran ["usermod", "-g", "10032", "-s", "/bin/sh", "git"] returned 6

完整日志:https://gist.github.com/ssbarnea/83b9c07678187dfe238f

git 用户不在 passwd 文件内是完全正常的,是 NIS 用户。另外,我无法找到 gitlab 从哪里获取用户组的 10032 值,为什么尝试重新配置它或者如何自定义或绕过它。

最佳答案

您首先需要create/have a different user in place .

您将替换为 installation documentation所有实例:

  • sudo -u gitsudo -u yourNewUser
  • 用户 git 为正确的用户,如 /home/git/ 替换为 /home/yourNewUser/

另请检查配置文件config/gitlab.yml :

# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
# user: git

关于gitlab - 如何让gitlab使用与git不同的用户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26142690/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com