更改gitlab的默认存储数据目录
更改gitlab的默认存储数据目录:
git_data_dirs({
"default" => {
"path" => "/home/guanli/git-data"
}
})
执行gitlab-ctl reconfigure 后报错:
Running handlers:
There was an error running gitlab-ctl reconfigure:
storage_directory[/home/guanli/git-data] (gitlab::gitlab-rails line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /home/guanli/git-data] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of stat --printf='%U' $(readlink -f /home/guanli/git-data) ----
STDOUT:
STDERR: stat: missing operand
Try 'stat --help' for more information.
---- End output of stat --printf='%U' $(readlink -f /home/guanli/git-data) ----
Ran stat --printf='%U' $(readlink -f /home/guanli/git-data) returned 1
原因: 权限不够 参考文章:https://blog.csdn.net/qq_35540820/article/details/85037923
解决办法: 依次给gitlab数据目录加权限
chmod +x /home
chmod +x /home/guanli
chmod +x /home/guanli/git-data
|