GitLab无法创建仓库

3

我安装了版本为6.9.0的gitlab。昨天我发现无法再创建存储库。

“无法再创建”意味着几天前它肯定是可以工作的。

虽然实验室中显示了新项目,但当我尝试推送内容时,它会拒绝它。然后我登录到服务器上,并看到只创建了文件project.wiki.git而没有project.git。

我不知道我改变了什么,但所有解决此类问题的修复都无法解决我的问题:

  1. repositories文件的所有者是git
  2. 显然它没有使用gem进行安装,因为所有类似于bundle exec rake的命令都会生成错误:Could not locate Gemfile

我阅读了以下stackoverflow问题:

  1. GitLab不创建新存储库
  2. Gitlab拒绝创建远程存储库
  3. 无法推送到新的gitlab安装

编辑: 这里是所请求的日志文件 添加新项目后的production.log:

Read fragment views/events/71-20140530224306379035000/4f2e3b7fc4c490233af266ce79f73477 (0.2ms)
Read fragment views/events/70-20140530224303047586000/4f2e3b7fc4c490233af266ce79f73477 (0.2ms)
Read fragment views/events/60-20140606091003103806000/4f2e3b7fc4c490233af266ce79f73477 (0.1ms)
Read fragment views/events/59-20140530163859919256000/4f2e3b7fc4c490233af266ce79f73477 (0.1ms)
Read fragment views/events/44-20140530155332492395000/4f2e3b7fc4c490233af266ce79f73477 (0.1ms)
Completed 200 OK in 134ms (Views: 69.9ms | ActiveRecord: 10.7ms)
Started GET "/projects/new" for 31.16.129.243 at 2014-07-12 01:41:49 +0200
Processing by ProjectsController#new as HTML
Completed 200 OK in 95ms (Views: 82.3ms | ActiveRecord: 7.0ms)
Started POST "/projects" for 31.16.129.243 at 2014-07-12 01:41:56 +0200
Processing by ProjectsController#create as JS
  Parameters: {"utf8"=>"✓", "project"=>{"name"=>"test", "namespace_id"=>"1", "path"=>"", "import_url"=>"", "description"=>"", "visibility_level"=>"0"}, "commit"=>"Create project"}
Completed 200 OK in 886ms (Views: 34.8ms | ActiveRecord: 133.9ms)
Started GET "/gitAdmin/test" for 31.16.129.243 at 2014-07-12 01:41:57 +0200
Processing by ProjectsController#show as HTML
  Parameters: {"id"=>"gitAdmin/test"}
Completed 200 OK in 61ms (Views: 25.4ms | ActiveRecord: 8.4ms)
Started GET "/gitAdmin/test?limit=20&offset=0" for 31.16.129.243 at 2014-07-12 01:41:58 +0200
Processing by ProjectsController#show as JSON
  Parameters: {"limit"=>"20", "offset"=>"0", "id"=>"gitAdmin/test"}
Read fragment views/events/149-20140711234156987342000/4f2e3b7fc4c490233af266ce79f73477 (0.3ms)
Write fragment views/events/149-20140711234156987342000/4f2e3b7fc4c490233af266ce79f73477 (0.3ms)
Completed 200 OK in 48ms (Views: 0.3ms | ActiveRecord: 8.7ms)

Sent mail to email@dr.ess (42.2ms)

编辑2:好的,我终于找到了正确的方法,也许有人现在可以帮忙了: 当我运行gitlab-ctl reconfigure时,会出现以下错误:

================================================================================
Error executing action `create` on resource 'user[git]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '8'
---- Begin output of ["usermod", "-d", "/var/opt/gitlab", "git"] ----
STDOUT: 
STDERR: usermod: user git is currently used by process 1356
---- End output of ["usermod", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-d", "/var/opt/gitlab", "git"] returned 8


Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/gitlab/recipes/users.rb

 27: user gitlab_username do
 28:   shell node['gitlab']['user']['shell']
 29:   home gitlab_home
 30:   gid gitlab_group
 31: end
 32: 



Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/gitlab/recipes/users.rb:27:in `from_file'

user("git") do
  action :create
  supports {:manage_home=>false, :non_unique=>false}
  retries 0
  retry_delay 2
  guard_interpreter :default
  username "git"
  gid 1004
  home "/var/opt/gitlab"
  shell "/bin/sh"
  cookbook_name :gitlab
  recipe_name "users"
end




Running handlers:
[2014-07-13T00:24:50+02:00] ERROR: Running exception handlers
Running handlers complete

[2014-07-13T00:24:50+02:00] ERROR: Exception handlers complete
[2014-07-13T00:24:50+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 7.231850297 seconds
[2014-07-13T00:24:50+02:00] ERROR: user[git] (gitlab::users line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '8'
---- Begin output of ["usermod", "-d", "/var/opt/gitlab", "git"] ----
STDOUT: 
STDERR: usermod: user git is currently used by process 1356
---- End output of ["usermod", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-d", "/var/opt/gitlab", "git"] returned 8
[2014-07-13T00:24:50+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

我希望你能帮忙,我非常需要GitLab。

1个回答

1

对于遇到相同问题的人:

我终于找到了解决方法: 由于某个我不记得的原因,我更改了git用户的主目录路径。将其设置为默认目录/var/opt/gitlab后,一切都正常工作了。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接