【发布时间】:2013-07-23 10:06:08
【问题描述】:
GitLab server can't start。原因很可能是gitlab.yml配置文件不正确。
用什么工具检查yml语法是否正确?
我尝试过 Notepad++ 和 SublimeText,但它们在不同的地方显示小符号:
记事本不喜欢缩进 1 行。
崇高文本
GitLab 配置解析器中的缩进和空格真的有问题吗?
【问题讨论】:
GitLab server can't start。原因很可能是gitlab.yml配置文件不正确。
用什么工具检查yml语法是否正确?
我尝试过 Notepad++ 和 SublimeText,但它们在不同的地方显示小符号:
记事本不喜欢缩进 1 行。
崇高文本
GitLab 配置解析器中的缩进和空格真的有问题吗?
【问题讨论】:
我使用的,这适用于任何编辑器,是以下之间的比较:
gitlab.ymlgitlab.yml.example我开发了一个小bash diff script,它将查找 keys 中的差异(不是值,因为您应该将自己的值放在那里)
## LDAP setting
ldap: (<--- it is a key)
enabled: true
^^^ ^^^
key value
我只是做一个:
cd gitlab/config
check_all_diff .
这样,如果密钥、密钥顺序、新密钥或已删除密钥有任何变化,我可以在升级 gitlab 时发现这些。
总而言之,您需要复制directory part of your $PATH:
check_all_diffcheck_diff(由check_all_diff调用)别忘了:
chmod 755 check_all_diff check_diffdos2unix will take care of those。【讨论】:
check_all_diff、chmod 755 check_all_diff 中,并确保它位于您的$PATH 的文件夹部分中。
chmod 755 check_all_diff 之后,我也无法让它以任何方式运行:check_all_diff, ./check_all_diff, sudo check_all_diff, sudo ./check_all_diff -> bash: check_all_diff: command not found。跨度>
$PATH 中添加了该脚本的父目录? (unix.stackexchange.com/q/26047/7490)
check_all_diff 时,我得到 /bin/bash^M: bad interpreter: No such file or directory