Poehli
Poehli

Reputation: 307

gitlab not creating repo

I have an gitlab installation with Version 6.9.0. Yesterday I noticed, that I can't create repositories any more.

When I say any more, it means, that it definitely was working some days ago.

It shows the new project in the lab, but when I try pushing stuff, its refusing it. I then logged into the server and saw, that only the file project.wiki.git was created and not project.git.

I don't know, what I changed, but all fixes to this kind of problem did not solve my problem:

  1. repositories file has owner git
  2. it was obviously not installed using gem, since all commands that look like bundle exec rake generates the error: Could not locate Gemfile

I read following stackoverflow questions:

  1. GitLab does not create new repository
  2. Gitlab refuses to create remote repositories
  3. Can't push to new gitlab install

EDIT: Here are the requested Logfiles production.log after adding a new project:

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 protected] (42.2ms)

EDIT2: Okay, I finally got on the right track, maybe someone can help now: When I run gitlab-ctl reconfigure I get following Error:

================================================================================
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)

I hope you can help, I really need the gitlab.

Upvotes: 3

Views: 2468

Answers (1)

Poehli
Poehli

Reputation: 307

For everyone encoutering the same issue:

I finally figured it out: To a reason I can't remember I changed the Home Path of my git user. After setting it to the default directory /var/opt/gitlab everything worked fine again.

Upvotes: 1

Related Questions