sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.88k stars 2.14k forks source link

Root login missing #386

Closed ovalin closed 9 years ago

ovalin commented 9 years ago

I seem to be missing the root login. I cant use it to login via the web interface I also logged into the database and checked the user table but only found my new users. (not sure if its even supposed to be listed there)

Is there a way to add an administrator/root account manually?

sameersbn commented 9 years ago

I seem to be missing the root login.

you mean the gitlab root user is missing?

I cant use it to login via the web interface I also logged into the database and checked the user table but only found my new users.

Are you refering to new users created in gitlab?

Is there a way to add an administrator/root account manually?

You can exec into the container and do.

Note: This will reinitialize the entire gitlab database and create the root user. This means that you will loose all user and project configurations created in gitlab,

cd /home/git/gitlab
sudo -HEu git bundle exec rake gitlab:setup
ovalin commented 9 years ago

I am getting an error when running that command

rake aborted! LoadError: cannot load such file -- rubocop/rake_task /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:247:in require' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:247:inblock in require' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:232:in load_dependency' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:247:inrequire' /home/git/gitlab/lib/tasks/rubocop.rake:2:in <top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:241:inload' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:241:in block in load' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:232:inload_dependency' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/dependencies.rb:241:in load' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/engine.rb:654:inblock in run_tasks_blocks' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/engine.rb:654:in each' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/engine.rb:654:inrun_tasks_blocks' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/application.rb:400:in run_tasks_blocks' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/engine.rb:449:inload_tasks' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/railtie.rb:194:in public_send' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.11/lib/rails/railtie.rb:194:inmethod_missing' /home/git/gitlab/Rakefile:7:in `<top (required)>' (See full trace by running task with --trace)

ovalin commented 9 years ago

Could this be another permissions issue?

ovalin commented 9 years ago

Is it possible I need a bundle install to have access to these dependencies?

sameersbn commented 9 years ago

@ovalin could be a permissions. The rake tasks is supposed to run without any bundle install or anything.

ovalin commented 9 years ago

hmmm yeah so when i do a bundle list I saw that rake wasnt installed I did a bundle install and reran the recommendation and got the same issue.

sameersbn commented 9 years ago

@ovalin this is what the output should look like

root@89ea8eb67902:/home/git/gitlab# bundle list
Gems included by the bundle:
  * CFPropertyList (2.3.1)
  * RedCloth (4.2.9)
  * ace-rails-ap (2.0.1)
  * actionmailer (4.1.11)
  * actionpack (4.1.11)
  * actionview (4.1.11)
  * activemodel (4.1.11)
  * activerecord (4.1.11)
  * activeresource (4.0.0)
  * activesupport (4.1.11)
  * acts-as-taggable-on (3.5.0)
  * addressable (2.3.8)
  * arel (5.0.1.20140414130214)
  * asana (0.0.6)
  * asciidoctor (1.5.2)
  * attr_encrypted (1.3.4)
  * attr_required (1.0.0)
  * autoprefixer-rails (5.1.11)
  * axiom-types (0.0.5)
  * bcrypt (3.1.7)
  * bootstrap-sass (3.3.4.1)
  * browser (0.8.0)
  * builder (3.2.2)
  * bundler (1.10.5)
  * cal-heatmap-rails (0.0.1)
  * carrierwave (0.9.0)
  * celluloid (0.16.0)
  * charlock_holmes (0.6.9.4)
  * coercible (1.0.0)
  * coffee-rails (4.1.0)
  * coffee-script (2.4.1)
  * coffee-script-source (1.9.1.1)
  * colored (1.2)
  * connection_pool (2.1.0)
  * creole (0.3.8)
  * d3_rails (3.5.5)
  * default_value_for (3.0.0)
  * descendants_tracker (0.0.3)
  * devise (3.2.4)
  * devise-async (0.9.0)
  * devise-two-factor (1.0.1)
  * diff-lcs (1.2.5)
  * diffy (3.0.3)
  * doorkeeper (2.1.3)
  * dotenv (0.9.0)
  * dropzonejs-rails (0.4.14)
  * encryptor (1.3.0)
  * enumerize (0.7.0)
  * equalizer (0.0.8)
  * erubis (2.7.0)
  * escape_utils (0.2.4)
  * eventmachine (1.0.4)
  * excon (0.45.3)
  * execjs (2.5.2)
  * expression_parser (0.9.0)
  * faraday (0.8.9)
  * faraday_middleware (0.9.0)
  * fission (0.5.0)
  * fog (1.25.0)
  * fog-brightbox (0.7.1)
  * fog-core (1.30.0)
  * fog-json (1.0.2)
  * fog-profitbricks (0.0.3)
  * fog-radosgw (0.0.4)
  * fog-sakuracloud (1.0.1)
  * fog-softlayer (0.4.6)
  * fog-terremark (0.1.0)
  * fog-vmfusion (0.1.0)
  * fog-voxel (0.1.0)
  * fog-xml (0.1.2)
  * font-awesome-rails (4.2.0.0)
  * foreman (0.63.0)
  * formatador (0.2.5)
  * gemnasium-gitlab-service (0.2.6)
  * gemojione (2.0.0)
  * github-markup (1.3.1)
  * gitlab-flowdock-git-hook (0.4.2.2)
  * gitlab-grack (2.0.2)
  * gitlab-grit (2.7.2)
  * gitlab-linguist (3.0.1)
  * gitlab_emoji (0.1.0)
  * gitlab_git (7.2.5)
  * gitlab_meta (7.0)
  * gitlab_omniauth-ldap (1.2.1)
  * gollum-grit_adapter (0.1.3)
  * gollum-lib (4.0.2)
  * gon (5.0.1)
  * grape (0.6.1)
  * grape-entity (0.4.2)
  * haml (4.0.5)
  * haml-rails (0.5.3)
  * hashie (2.1.2)
  * hike (1.2.3)
  * hipchat (1.5.0)
  * hitimes (1.2.2)
  * html-pipeline (1.11.0)
  * http_parser.rb (0.5.3)
  * httparty (0.13.3)
  * httpauth (0.2.1)
  * httpclient (2.5.3.3)
  * i18n (0.7.0)
  * ice_cube (0.11.1)
  * ice_nine (0.10.0)
  * inflecto (0.0.2)
  * ipaddress (0.8.0)
  * jquery-atwho-rails (1.0.1)
  * jquery-rails (3.1.3)
  * jquery-scrollto-rails (1.4.3)
  * jquery-turbolinks (2.0.1)
  * jquery-ui-rails (4.2.1)
  * json (1.8.3)
  * jwt (0.1.13)
  * kaminari (0.15.1)
  * kgio (2.9.2)
  * macaddr (1.7.1)
  * mail (2.6.3)
  * mime-types (1.25.1)
  * mimemagic (0.3.0)
  * mini_portile (0.6.2)
  * minitest (5.3.5)
  * mousetrap-rails (1.4.6)
  * multi_json (1.11.1)
  * multi_xml (0.5.5)
  * multipart-post (1.2.0)
  * mysql2 (0.3.16)
  * net-ldap (0.11)
  * net-scp (1.2.1)
  * net-ssh (2.9.2)
  * newrelic_rpm (3.9.4.245)
  * nokogiri (1.6.6.2)
  * nprogress-rails (0.1.2.3)
  * oauth (0.4.7)
  * oauth2 (0.8.1)
  * octokit (3.7.0)
  * omniauth (1.2.2)
  * omniauth-bitbucket (0.0.2)
  * omniauth-github (1.1.1)
  * omniauth-gitlab (1.0.0)
  * omniauth-google-oauth2 (0.2.5)
  * omniauth-kerberos (0.2.0)
  * omniauth-multipassword (0.4.1)
  * omniauth-oauth (1.0.1)
  * omniauth-oauth2 (1.1.1)
  * omniauth-saml (1.3.1)
  * omniauth-shibboleth (1.1.1)
  * omniauth-twitter (1.0.1)
  * opennebula (4.12.1)
  * org-ruby (0.9.12)
  * orm_adapter (0.5.0)
  * pg (0.18.2)
  * posix-spawn (0.3.9)
  * pyu-ruby-sasl (0.0.3.3)
  * rack (1.5.5)
  * rack-accept (0.4.5)
  * rack-attack (4.3.0)
  * rack-cors (0.2.9)
  * rack-mount (0.8.3)
  * rack-oauth2 (1.0.8)
  * rack-protection (1.5.1)
  * rack-test (0.6.3)
  * rails (4.1.11)
  * rails-observers (0.1.2)
  * railties (4.1.11)
  * raindrops (0.13.0)
  * rake (10.4.2)
  * raphael-rails (2.1.2)
  * rbvmomi (1.8.2)
  * rdoc (3.12.2)
  * redcarpet (3.3.2)
  * redis (3.1.0)
  * redis-actionpack (4.0.0)
  * redis-activesupport (4.0.0)
  * redis-namespace (1.5.1)
  * redis-rack (1.5.0)
  * redis-rails (4.0.0)
  * redis-store (1.1.4)
  * request_store (1.0.5)
  * rinku (1.7.3)
  * rotp (1.6.1)
  * rouge (1.7.7)
  * rqrcode (0.4.2)
  * rqrcode-rails3 (0.1.7)
  * ruby-saml (0.8.2)
  * rubyntlm (0.5.0)
  * rubypants (0.2.0)
  * rugged (0.22.2)
  * rugments (1.0.0.beta8)
  * sanitize (2.1.0)
  * sass (3.2.19)
  * sass-rails (4.0.5)
  * sawyer (0.6.0)
  * seed-fu (2.3.5)
  * select2-rails (3.5.9.3)
  * settingslogic (2.0.9)
  * sidekiq (3.3.0)
  * sidetiq (0.6.3)
  * simple_oauth (0.1.9)
  * sinatra (1.4.4)
  * six (0.2.0)
  * slack-notifier (1.0.0)
  * slim (2.0.2)
  * sprockets (2.12.4)
  * sprockets-rails (2.3.2)
  * stamp (0.5.0)
  * state_machine (1.2.0)
  * stringex (2.5.2)
  * systemu (2.6.5)
  * task_list (1.0.2)
  * temple (0.6.7)
  * thor (0.19.1)
  * thread_safe (0.3.5)
  * tilt (1.4.1)
  * timers (4.0.1)
  * timfel-krb5-auth (0.8.3)
  * tinder (1.9.3)
  * trollop (2.1.2)
  * turbolinks (2.5.3)
  * twitter-stream (0.1.16)
  * tzinfo (1.2.2)
  * uglifier (2.3.2)
  * underscore-rails (1.4.4)
  * unf (0.1.4)
  * unf_ext (0.0.7.1)
  * unicorn (4.6.3)
  * unicorn-worker-killer (0.4.2)
  * uuid (2.3.7)
  * version_sorter (2.0.0)
  * virtus (1.0.1)
  * warden (1.2.3)
  * wikicloth (0.8.1)
ovalin commented 9 years ago

Thank you that's what I have now So I reran what you sent me with RAILS_ENV=production included and was able to run it successfully.

Thank you again for the help.

BTW given the types of issues I've seen would you have any suggestions as to things I should look into. to verify that my install is now correct and that I wont run into any more in the future?

sameersbn commented 9 years ago

@ovalin you might want to run the gitlab check raketasks https://github.com/gitlabhq/gitlabhq/blob/master/doc/raketasks/maintenance.md#check-gitlab-configuration