0

I followed the directions here https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and have the gitlab community page up and running but I cannot login.

Someone suggested doing this: bundle exec rake db:seed_fu RAILS_ENV=production (in /home/git/gitlab)

I got a FATAL error suggesting no role for root, I then followed this: FATAL: role "root" does not exist and created a role, now I get this error: [root@gitlab gitlab]# bundle exec rake db:seed_fu RAILS_ENV=production

== Seed from /home/git/gitlab/db/fixtures/production/001_admin.rb rake aborted! ActiveRecord::StatementInvalid: PG::Error: ERROR: permission denied for relation users : SELECT 1 AS one FROM "users" WHERE "users"."email" = 'admin@example.com' LIMIT 1 /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/seed-fu-2.3.1/lib/seed-fu/runner.rb:46:in `eval'

[root@gitlab gitlab]# sudo -u git -H cat config/database.yml
#
# PRODUCTION
#
production:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_production
  pool: 10
  # username: git
  # password:
  # host: localhost
  # port: 5432

#
# Development specific
#
development:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_development
  pool: 5
  username: postgres
  password:

#
# Staging specific
#
staging:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_staging
  pool: 5
  username: postgres
  password:

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_test
  pool: 5
  username: postgres
  password:

Please help. I do not know ruby and I also don't know postgresql

Community
  • 1
  • 1
user5191140
  • 61
  • 1
  • 1
  • 5
  • You need to run the rake command as the git user, not root. – Per Johansson Aug 04 '15 at 19:47
  • That worked: [root@gitlab gitlab]# sudo -u git -H bundle exec rake db:seed_fu RAILS_ENV=production == Seed from /home/git/gitlab/db/fixtures/production/001_admin.rb 2015-08-04T20:46:17Z 10249 TID-ovduixbrs INFO: Sidekiq client with redis options {:url=>"unix:/var/run/redis/redis.sock", :namespace=>"resque:gitlab"} Administrator account created: login.........root password......5iveL!fe [root@gitlab gitlab]# – user5191140 Aug 04 '15 at 20:47
  • would like to mark this as "solved". Not sure how. Thanks againto Per Johansson – user5191140 Aug 04 '15 at 20:51
  • Well yo can't because I made the pretty common mistake of making the answer a comment, since I felt it wasn't a fully fledged answer (wasn't even sure that was the issue). A proper answer would have a checkmark next to it you can check to mark as solved. No worries, either let it linger or close it, fine either way. – Per Johansson Aug 04 '15 at 22:14
  • It is very hard to make gitlab working while installing everything like that. I suggest you to do the simple solution : https://about.gitlab.com/downloads/ – w3spi Aug 06 '15 at 15:13

0 Answers0