尝试在gitlab中提交时,我收到以下错误。在提交之前我需要做任何先前的环境设置吗?
/opt/gitlab/embedded/lib/ruby/2.3.0/psych.rb:474:in `initialize': Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-shell/config.yml (Errno::EACCES)
from /opt/gitlab/embedded/lib/ruby/2.3.0/psych.rb:474:in `open'
from /opt/gitlab/embedded/lib/ruby/2.3.0/psych.rb:474:in `load_file'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_config.rb:7:in `initialize'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:13:in `new'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:13:in `<top (required)>'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_net.rb:6:in `require_relative'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_net.rb:6:in `<top (required)>'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_shell.rb:4:in `require_relative'
from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_shell.rb:4:in `<top (required)>'
from /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell:22:in `<main>'
fatal: The remote end hung up unexpectedly
答案 0 :(得分:0)
错误提到GitLab Shell配置文件的权限被拒绝。确保文件/opt/gitlab/embedded/service/gitlab-shell/config.yml
归git
所有,因此GitLab Shell可以在推送期间读取配置。
但是很奇怪这个文件开头有一个权限问题。如果您更改了/etc/gitlab/gitlab.rb
中的任何配置,请务必运行sudo gitlab-ctl reconfigure
。另外,避免弄乱/opt/gitlab
内的任何内容。