Git克隆失败,而提交在gitlab中工作正常

时间:2017-12-07 14:35:47

标签: gitlab

尝试在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

1 个答案:

答案 0 :(得分:0)

错误提到GitLab Shell配置文件的权限被拒绝。确保文件/opt/gitlab/embedded/service/gitlab-shell/config.ymlgit所有,因此GitLab Shell可以在推送期间读取配置。

但是很奇怪这个文件开头有一个权限问题。如果您更改了/etc/gitlab/gitlab.rb中的任何配置,请务必运行sudo gitlab-ctl reconfigure。另外,避免弄乱/opt/gitlab内的任何内容。