raphendyr / gitlabhq

This fork contained implementation for PAM based login to Gitlab. It's left as archived as the feature was never merged.
MIT License
1 stars 1 forks source link

Problems getting 6-3 branch working #7

Closed vanthome closed 2 years ago

vanthome commented 10 years ago

Hi, I tried the 6-3 now and unfortunately end up with this:

(<unknown>): did not find expected key while parsing a block mapping at line 130 column 5 (Psych::SyntaxError)
  /usr/lib64/ruby/2.0.0/psych.rb:205:in `parse'
  /usr/lib64/ruby/2.0.0/psych.rb:205:in `parse_stream'
  /usr/lib64/ruby/2.0.0/psych.rb:153:in `parse'
  /usr/lib64/ruby/2.0.0/psych.rb:129:in `load'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:103:in `initialize'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `new'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `instance'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:37:in `[]'
  /sync1/gitlab/config/initializers/1_settings.rb:47:in `<top (required)>'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `block in load'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `each'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `block in <class:Engine>'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /sync1/gitlab/config/environment.rb:5:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/local/lib64/ruby/gems/2.0.0/gems/passenger-4.0.23/helper-scripts/rack-preloader.rb:105:in `eval'
  /usr/local/lib64/ruby/gems/2.0.0/gems/passenger-4.0.23/helper-scripts/rack-preloader.rb:105:in `preload_app'
  /usr/local/lib64/ruby/gems/2.0.0/gems/passenger-4.0.23/helper-scripts/rack-preloader.rb:150:in `<module:App>'
  /usr/local/lib64/ruby/gems/2.0.0/gems/passenger-4.0.23/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /usr/local/lib64/ruby/gems/2.0.0/gems/passenger-4.0.23/helper-scripts/rack-preloader.rb:28:in `<main>'

Line 130 is the enabled: true in the pam section. My config looks like this:

  #
  #2. Auth settings
  # ==========================

  ## LDAP settings
  ldap:
    enabled: false
    host: '_your_ldap_server'
    base: '_the_base_where_you_search_for_users'
    port: 636
    uid: 'sAMAccountName'
    method: 'ssl' # "ssl" or "plain"
    bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
    password: '_the_password_of_the_bind_user'
    allow_username_or_email_login: true

  ## PAM settings
  # Currently unix_pam do not work as expected, so pam works only with modules like ldap, sssd, krb
  # or you need to run gitlab as root (NOT RECOMMENDED!)
  # Read more from: https://github.com/canweriotnow/rpam-ruby19/issues/5
  pam:
    enabled: true
    email_domain: 'example.org', # if gecos do not provide email, you need to use this option
    gecos_map: ['name', 'location', 'phone', 'home_phone', 'email'], # map for gecos attributes
    service: 'gitlab', # what pam service to use

  ## OmniAuth settings
  omniauth:
    enabled: true

    # CAUTION!
    # This allows users to login without having a user account first (default: false).
    # User accounts will be created automatically when authentication was successful.
    allow_single_sign_on: false
    # Locks down those users until they have been cleared by the admin (default: true).
    block_auto_created_users: true

    ## Auth providers
    # Uncomment the following lines and fill in the data of the auth provider you want to use
    # If your favorite auth provider is not listed you can use others:
    # see https://github.com/gitlabhq/gitlabhq/wiki/Using-Custom-Omniauth-Providers
    # The 'app_id' and 'app_secret' parameters are always passed as the first two
    # arguments, followed by optional 'args' which can be either a hash or an array.
    providers:
      # - { name: 'google_oauth2', app_id: 'YOUR APP ID',
      #     app_secret: 'YOUR APP SECRET',
      #     args: { access_type: 'offline', approval_prompt: '' } }
      # - { name: 'twitter', app_id: 'YOUR APP ID',
      #     app_secret: 'YOUR APP SECRET'}
      # - { name: 'github', app_id: 'YOUR APP ID',
      #     app_secret: 'YOUR APP SECRET' }
       - { name: 'pam' }
b0ric commented 10 years ago

Hi there:) Don't use commas at the line ends:

  ## PAM settings
  # Currently unix_pam do not work as expected, so pam works only with modules like ldap, sssd, krb
  # or you need to run gitlab as root (NOT RECOMMENDED!)
  # Read more from: https://github.com/canweriotnow/rpam-ruby19/issues/5
  pam:
    enabled: true
    email_domain: 'example.org' # if gecos do not provide email, you need to use this option
    gecos_map: ['name', 'location', 'phone', 'home_phone', 'email'] # map for gecos attributes
    service: 'gitlab' # what pam service to use

and also do not forget to uncomment line 24 in Gemfile:

gem "omniauth-pam", "~> 1.1.0"

The 6-3 branch is working fine for me, except one issue #6 I reported yesterday, but it's easy to fix

vanthome commented 10 years ago

gna, what a noobish error :), k, sorted this out and also upped omniauth-pam to version 1.2.1 which was not pulled although I did a bundle update.
Unfortunately it still does not work for me. I get a 500 or Received wrong number of arguments. [nil, nil] (ArgumentError) depending on whether I have this enabled or disabled:

    providers:
        - { name: 'pam' }

Do you have this enabled?

Also which underlying PAM backend do you use... I suspect that I need this "gecos" thing...

b0ric commented 10 years ago

Here's my config for your reference:

# # # # # # # # # # # # # # # # # #
# GitLab application config file  #
# # # # # # # # # # # # # # # # # #
#
# How to use:
# 1. copy file as gitlab.yml
# 2. Replace gitlab -> host with your domain
# 3. Replace gitlab -> email_from

production: &base
  #
  # 1. GitLab app settings
  # ==========================

  ## GitLab settings
  gitlab:
    ## Web server settings
    host: example.com
    port: 80
    https: true

    # Uncomment and customize the last line to run in a non-root path
    # WARNING: This feature is no longer supported
    # Note that three settings need to be changed for this to work.
    # 1) In your application.rb file: config.relative_url_root = "/gitlab"
    # 2) In your gitlab.yml file: relative_url_root: /gitlab
    # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT']
    #
    # relative_url_root: /gitlab

    # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
    # user: git

    ## Email settings
    # Email address used in the "From" field in mails sent by GitLab
    email_from: gitlab@example.com

    # Email address of your support contact (default: same as email_from)
    support_email: support@example.com

    ## User settings
    default_projects_limit: 20
    # default_can_create_group: false  # default: true
    username_changing_enabled: false # default: true - User can change her username/namespace

    ## Users management
    # signup_enabled: true          # default: false - Account passwords are not sent via the email if signup is enabled.

    ## Automatic issue closing
    # If a commit message matches this regular express, all issues referenced from the matched text will be closed
    # if it's pushed to a project's default branch.
    # issue_closing_pattern: "^([Cc]loses|[Ff]ixes) +#\d+"

    ## Default project features settings
    default_projects_features:
      issues: false
      merge_requests: true
      wiki: false
      wall: true
      snippets: true
      public: false

  ## External issues trackers
  issues_tracker:
    # redmine:
    #   ## If not nil, link 'Issues' on project page will be replaced with this
    #   ## Use placeholders:
    #   ##  :project_id        - GitLab project identifier
    #   ##  :issues_tracker_id - Project Name or Id in external issue tracker
    #   project_url: "http://redmine.sample/projects/:issues_tracker_id"
    #
    #   ## If not nil, links from /#\d/ entities from commit messages will replaced with this
    #   ## Use placeholders:
    #   ##  :project_id        - GitLab project identifier
    #   ##  :issues_tracker_id - Project Name or Id in external issue tracker
    #   ##  :id                - Issue id (from commit messages)
    #   issues_url: "http://redmine.sample/issues/:id"
    #
    #   ## If not nil, linkis to creating new issues will be replaced with this
    #   ## Use placeholders:
    #   ##  :project_id        - GitLab project identifier
    #   ##  :issues_tracker_id - Project Name or Id in external issue tracker
    #   new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
    # 
    # jira:
    #   project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
    #   issues_url: "http://jira.sample/browse/:id"
    #   new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"

  ## Gravatar
  gravatar:
    enabled: true                 # Use user avatar image from Gravatar.com (default: true)
    # plain_url: "http://..."     # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
    # ssl_url:   "https://..."    # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm

  #
  # 2. Auth settings
  # ==========================

  ## LDAP settings
  ldap:
    enabled: false
    host: '_your_ldap_server'
    base: '_the_base_where_you_search_for_users'
    port: 636
    uid: 'sAMAccountName'
    method: 'ssl' # "ssl" or "plain"
    bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
    password: '_the_password_of_the_bind_user'
    allow_username_or_email_login: true

  ## PAM settings
  #  Currently unix_pam do not work as expected, so pam works only with modules like ldap, sssd, krb
  #  or you need to run gitlab as root (NOT RECOMMENDED!)
  #  Read more from: https://github.com/canweriotnow/rpam-ruby19/issues/5
  pam:
    enabled: true
    email_domain: 'example.com' # if gecos do not provide email, you need to use this option
    gecos_map: ['name', 'location', 'phone', 'home_phone', 'email'] # map for gecos attributes
    service: 'gitlab' # what pam service to use

  ## OmniAuth settings
  omniauth:
    # Allow login via Twitter, Google, etc. using OmniAuth providers
    enabled: true

    # CAUTION!
    # This allows users to login without having a user account first (default: false).
    # User accounts will be created automatically when authentication was successful.
    allow_single_sign_on: true
    # Locks down those users until they have been cleared by the admin (default: true).
    block_auto_created_users: true

    ## Auth providers
    # Uncomment the following lines and fill in the data of the auth provider you want to use
    # If your favorite auth provider is not listed you can use others:
    # see https://github.com/gitlabhq/gitlabhq/wiki/Using-Custom-Omniauth-Providers
    # The 'app_id' and 'app_secret' parameters are always passed as the first two
    # arguments, followed by optional 'args' which can be either a hash or an array.
    providers:
      # - { name: 'google_oauth2', app_id: 'YOUR APP ID',
      #     app_secret: 'YOUR APP SECRET',
      #     args: { access_type: 'offline', approval_prompt: '' } }
      # - { name: 'twitter', app_id: 'YOUR APP ID',
      #     app_secret: 'YOUR APP SECRET'}
      # - { name: 'github', app_id: 'YOUR APP ID',
      #     app_secret: 'YOUR APP SECRET' }

  #
  # 3. Advanced settings
  # ==========================

  # GitLab Satellites
  satellites:
    # Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
    path: /home/git/gitlab-satellites/

  ## Backup settings
  backup:
    path: "tmp/backups"   # Relative paths are relative to Rails.root (default: tmp/backups/)
    # keep_time: 604800   # default: 0 (forever) (in seconds)

  ## GitLab Shell settings
  gitlab_shell:
    # REPOS_PATH MUST NOT BE A SYMLINK!!!
    repos_path: /home/git/repositories/
    hooks_path: /home/git/gitlab-shell/hooks/

    # Git over HTTP
    upload_pack: true
    receive_pack: true

    # If you use non-standard ssh port you need to specify it
    # ssh_port: 22

  ## Git settings
  # CAUTION!
  # Use the default values unless you really know what you are doing
  git:
    bin_path: /usr/bin/git
    # Max size of a git object (e.g. a commit), in bytes
    # This value can be increased if you have very large commits
    max_size: 20971520 # 20.megabytes
    # Git timeout to read a commit, in seconds
    timeout: 10

  #
  # 4. Extra customization
  # ==========================

  extra:
    ## Google analytics. Uncomment if you want it
    google_analytics_id: 'UA-44510256-1'

    ## Text under sign-in page (Markdown enabled)
    # sign_in_text: |
    #   ![Company Logo](http://www.companydomain.com/logo.png)
    #   [Learn more about CompanyName](http://www.companydomain.com/)

development:
  <<: *base

test:
  <<: *base
  issues_tracker:
    redmine:
      project_url: "http://redmine/projects/:issues_tracker_id"
      issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
      new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"

staging:
  <<: *base

and please, post full stack trace in case of error, 'cause it's quite hard to guess what's going on.

vanthome commented 10 years ago

Thanks! now I'm ending up with this in the logs:

ActionView::Template::Error (File to import not found or unreadable: bootstrap/reset.
Load paths:
  Sass::Rails::Importer(/sync1/gitlab/app/assets/stylesheets/application.scss)
  /sync1/gitlab/app/assets/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.0.2.1/vendor/assets/stylesheets
  Compass::SpriteImporter
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.0.2.1/vendor/assets/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.0.2.1/vendor/assets/stylesheets
  (in /sync1/gitlab/app/assets/stylesheets/application.scss)):
    4:     = "#{title} | " if defined?(title)
    5:     GitLab
    6:   = favicon_link_tag 'favicon.ico'
    7:   = stylesheet_link_tag    "application"
    8:   = javascript_include_tag "application"
    9:   = csrf_meta_tags
    10:   = include_gon
  app/assets/stylesheets/gitlab_bootstrap.scss:10
  app/assets/stylesheets/application.scss:16
  app/views/layouts/_head.html.haml:7:in `_app_views_layouts__head_html_haml___1981343171477993025_29057260'
  app/views/layouts/application.html.haml:3:in `_app_views_layouts_application_html_haml__2403341006893159020_30856520'
  app/controllers/dashboard_controller.rb:23:in `show'
  app/controllers/application_controller.rb:54:in `set_current_user_for_thread'

Any idea?

b0ric commented 10 years ago

Well, now it seems that gitlab_bootstrap.scss:10 imports non-existent .scss file:

@import "bootstrap/reset";

I didn't bump into this, strange. Do you run in production mode? Execute

rake assets:precompile

and start in production mode if not. Otherwise you may try to remove this references.

vanthome commented 10 years ago

Mhhh, strange... yes I run in production mode. commenting it out won't help as also other includes are missing and this cannot be the solution :(

rake assets:precompile

results in:

rake aborted!
cannot load such file -- rb-inotify
/sync1/gitlab/config/application.rb:9:in `<top (required)>'
/sync1/gitlab/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
b0ric commented 10 years ago

You should do it like this: RAILS_ENV=production rake assets:precompile

Otherwise it will look for development gems that are not installed (if you followed official installation guide) How do you run it in production mode?

From: Thomas notifications@github.com Reply-To: raphendyr/gitlabhq <reply+i-23234167-208af3cdef9d5f268ec32d244c881f7d27a60826-3423137@reply.git hub.com> Date: Tuesday, November 26, 2013 at 14:41 To: raphendyr/gitlabhq gitlabhq@noreply.github.com Cc: Oleksandr Borysov b0ric.alex@gmail.com Subject: Re: [gitlabhq] Problems getting 6-3 branch working (#7)

Mhhh, strange... yes I run in production mode. commenting it out won't help as also other includes are missing and this cannot be the solution :(

rake assets:precompile

results in: rake aborted! cannot load such file -- rb-inotify /sync1/gitlab/config/application.rb:9:in <top (required)>' /sync1/gitlab/Rakefile:5:in<top (required)>' (See full trace by running task with --trace) ‹ Reply to this email directly or view it on GitHub https://github.com/raphendyr/gitlabhq/issues/7#issuecomment-29289041 .

vanthome commented 10 years ago

Really sorry bit this results in:

/usr/bin/ruby20 /usr/local/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
File to import not found or unreadable: bootstrap/layouts.
Load paths:
  Sass::Rails::Importer(/sync1/gitlab/app/assets/stylesheets/application.scss)
  /sync1/gitlab/app/assets/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.0.2.1/vendor/assets/stylesheets
  Compass::SpriteImporter
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.0.2.1/vendor/assets/stylesheets
  /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.0.2.1/vendor/assets/stylesheets
  (in /sync1/gitlab/app/assets/stylesheets/application.scss)
/sync1/gitlab/app/assets/stylesheets/gitlab_bootstrap.scss:13
/sync1/gitlab/app/assets/stylesheets/application.scss:16
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:67:in `rescue in import'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:45:in `import'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:28:in `imported_file'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:37:in `css_import?'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:217:in `visit_import'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:227:in `block in visit_import'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:227:in `map'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:227:in `visit_import'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20:in `render'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:315:in `_render'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:262:in `render'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sass-rails-3.2.6/lib/sass/rails/template_handlers.rb:106:in `evaluate'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:12:in `initialize'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:16:in `initialize'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/static_compiler.rb:19:in `block in compile'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/static_compiler.rb:18:in `compile'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/assets.rake:56:in `internal_precompile'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/bin/ruby20 /usr/local/bin/rake assets...]
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/sync1/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.15/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

I thought production mode is the default as per gitlab.yml I did not change anything regarding this. Also I have a log file production.log which is used.

The relevant steps I did were:

bundle install --without development test postgres --path vendor/bundle --no-deployment and bundle update

as my gitlab user

the latter results in:

bundle update
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using multi_json (1.8.2) 
Using activesupport (3.2.15) 
Using builder (3.0.4) 
Using activemodel (3.2.15) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.15) 
Using mime-types (1.25.1) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.15) 
Using arel (3.0.3) 
Using tzinfo (0.3.38) 
Using activerecord (3.2.15) 
Using activeresource (3.2.15) 
Using bundler (1.3.5) 
Using rack-ssl (1.3.3) 
Using json (1.8.1) 
Using rdoc (3.12.2) 
Using thor (0.18.1) 
Using railties (3.2.15) 
Using rails (3.2.15) 
Using acts-as-taggable-on (2.4.1) 
Using asciidoctor (0.1.4) 
Using descendants_tracker (0.0.3) 
Using ice_nine (0.10.0) 
Using axiom-types (0.0.5) 
Using backports (3.3.5) 
Using bcrypt-ruby (3.1.2) 
Using sass (3.2.12) 
Using bootstrap-sass (3.0.2.1) 
Using carrierwave (0.9.0) 
Using timers (1.1.0) 
Using celluloid (0.15.2) 
Using charlock_holmes (0.6.9.4) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.2) 
Using coffee-script (2.2.0) 
Using coffee-rails (3.2.2) 
Using chunky_png (1.2.9) 
Using fssm (0.2.10) 
Using compass (0.12.2) 
Using compass-rails (1.0.3) 
Using sass-rails (3.2.6) 
Using chosen-rails (1.0.0) 
Using coercible (0.2.0) 
Using colored (1.2) 
Installing connection_pool (1.2.0) 
Using d3_rails (3.1.10) 
Using orm_adapter (0.5.0) 
Using warden (1.2.3) 
Using devise (2.2.8) 
Using devise-async (0.8.0) 
Using diff-lcs (1.2.5) 
Using dotenv (0.9.0) 
Using enumerize (0.7.0) 
Using equalizer (0.0.7) 
Using escape_utils (0.2.4) 
Using etc (0.2.0) 
Using eventmachine (1.0.3) 
Using excon (0.13.4) 
Using multipart-post (1.2.0) 
Using faraday (0.8.8) 
Using faraday_middleware (0.9.0) 
Using formatador (0.2.4) 
Using net-ssh (2.7.0) 
Using net-scp (1.0.4) 
Using nokogiri (1.5.10) 
Using ruby-hmac (0.4.0) 
Using fog (1.3.1) 
Using font-awesome-rails (4.0.3.0) 
Using foreman (0.63.0) 
Using gemoji (1.2.1) 
Using posix-spawn (0.3.6) 
Using yajl-ruby (1.1.0) 
Using pygments.rb (0.4.2) 
Using github-linguist (2.3.4) 
Using github-markdown (0.5.5) 
Using github-markup (0.7.5) 
Using gitlab-grit (2.6.3) 
Using gitlab-flowdock-git-hook (0.4.2.2) 
Using sanitize (2.0.6) 
Using stringex (1.5.1) 
Using gitlab-gollum-lib (1.0.1) 
Using gitlab-grack (1.0.1) 
Using gitlab-pygments.rb (0.3.2) 
Using gitlab_git (3.0.1) 
Using gitlab_meta (6.0) 
Using net-ldap (0.3.1) 
Using hashie (2.0.5) 
Using omniauth (1.1.4) 
Using pyu-ruby-sasl (0.0.3.3) 
Using rubyntlm (0.1.1) 
Using gitlab_omniauth-ldap (1.0.3) 
Using gon (4.1.1) 
Using multi_xml (0.5.5) 
Using rack-accept (0.4.5) 
Using rack-mount (0.8.3) 
Using virtus (1.0.0) 
Using grape (0.4.1) 
Using grape-entity (0.3.0) 
Using haml (4.0.4) 
Using haml-rails (0.4) 
Using httparty (0.12.0) 
Using hipchat (0.9.0) 
Using http_parser.rb (0.5.3) 
Using httpauth (0.2.0) 
Using jquery-atwho-rails (0.3.0) 
Using jquery-rails (2.1.3) 
Using turbolinks (1.3.1) 
Using jquery-turbolinks (2.0.1) 
Using jquery-ui-rails (2.0.2) 
Using jwt (0.1.8) 
Using kaminari (0.14.1) 
Using kgio (2.8.1) 
Using libv8 (3.16.14.3) 
Using modernizr (2.6.2) 
Using mysql2 (0.3.14) 
Using oauth (0.4.7) 
Using oauth2 (0.8.1) 
Using omniauth-oauth2 (1.1.1) 
Using omniauth-github (1.1.1) 
Using omniauth-google-oauth2 (0.2.1) 
Using omniauth-oauth (1.0.1) 
Using rpam-ruby19 (1.2.1) 
Using omniauth-pam (1.2.1) 
Using omniauth-twitter (1.0.1) 
Using rack-attack (2.3.0) 
Using rack-protection (1.5.1) 
Using raindrops (0.12.0) 
Using raphael-rails (2.1.2) 
Using redcarpet (2.2.2) 
Using redis (3.0.6) 
Using redis-store (1.1.4) 
Using redis-rack (1.4.4) 
Using redis-actionpack (3.2.4) 
Using redis-activesupport (3.2.4) 
Using redis-namespace (1.3.2) 
Using redis-rails (3.2.4) 
Using ref (1.0.5) 
Using seed-fu (2.3.0) 
Using select2-rails (3.5.2) 
Using settingslogic (2.0.9) 
Using sidekiq (2.17.0) 
Using simple_oauth (0.1.9) 
Using sinatra (1.4.4) 
Using six (0.2.0) 
Using temple (0.6.7) 
Using slim (2.0.2) 
Using stamp (0.5.0) 
Using state_machine (1.2.0) 
Using therubyracer (0.12.0) 
Using twitter-stream (0.1.16) 
Using tinder (1.9.3) 
Using uglifier (2.3.1) 
Using underscore-rails (1.4.4) 
Using unicorn (4.6.3) 
Your bundle is updated!
Gems in the groups development, test and postgres were not installed.

which clearly lists bootstrap

b0ric commented 10 years ago

For some reason your bundle use

Using bootstrap-sass (3.0.2.1)

instead you should be using 2nd version

vanthome commented 10 years ago

The Gemfile says gem 'bootstrap-sass' which version do you have?

b0ric commented 10 years ago

Yep, my Gemfile also do not specify the version, but Gemfile.lock states

bootstrap-sass (2.3.2.2)

Try to specify this version explicitly

From: Thomas notifications@github.com Reply-To: raphendyr/gitlabhq <reply+i-23234167-208af3cdef9d5f268ec32d244c881f7d27a60826-3423137@reply.git hub.com> Date: Tuesday, December 3, 2013 at 15:13 To: raphendyr/gitlabhq gitlabhq@noreply.github.com Cc: Oleksandr Borysov b0ric.alex@gmail.com Subject: Re: [gitlabhq] Problems getting 6-3 branch working (#7)

The Gemfile says gem 'bootstrap-sass' which version do you have?

‹ Reply to this email directly or view it on GitHub https://github.com/raphendyr/gitlabhq/issues/7#issuecomment-29708140 .

vanthome commented 10 years ago

Now the same issue with compass... I give up, MANY thanks for your help! Don't you also think this approach sucks? We need to get this in the official repo as Gitlab moves to quickly to rebase all the changes.

b0ric commented 10 years ago

Yep, I also would like it to be this was, but it a question to raphendyr whether he sent merge request and whether Gitlab team accepted it.

xaionaro commented 10 years ago

@vanthome, can you try with fixed version of "bootstrap-sass"? :)

vanthome commented 10 years ago

Yes it works after tweaking this. Authentication with PAM does not however.

b0ric commented 10 years ago

Did you create file 'gitlub' pam rules in /etc/pam.d folder? This name should correspond to what you've specified in gitlab.yml, by default it's 'gitlab'.

xaionaro commented 10 years ago

@vanthome:

I have working configuration. :)

What problem did you faced now?

xaionaro commented 10 years ago

It's enabled both on my configuration: PAM and LDAP.

Total:

  1. gitlab -> LDAP
  2. gitlab -> PAM -> radius -> second LDAP and MySQL

There's few problems, anyway (with git, but all of them solvable)

vanthome commented 10 years ago

I'm using the service 'pwauth' which I use with apache already and is known to work. Do you think I need a dedicated one for gitlab?

This is logged:

Processing by OmniauthCallbacksController#failure as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxx", "username"=>"xxx", "password"=>"[FILTERED]"}
Redirected to https://gitlab.n-fuse.de/users/sign_in
Completed 302 Found in 21.0ms (ActiveRecord: 0.0ms)
Started GET "/users/sign_in" for 217.92.97.169 at 2013-12-12 14:39:04 +0100
Processing by Devise::SessionsController#new as HTML
  Rendered devise/sessions/_new_pam.html.haml (3.3ms)
  Rendered devise/sessions/_new_base.html.haml (5.9ms)
  Rendered devise/sessions/_oauth_providers.html.haml (2.2ms)
  Rendered devise/sessions/new.html.haml within layouts/devise (24.2ms)
  Rendered layouts/_head.html.haml (451.0ms)
  Rendered layouts/_flash.html.haml (1.9ms)
Completed 200 OK in 644.5ms (Views: 495.0ms | ActiveRecord: 0.0ms)
xaionaro commented 10 years ago

What do you see in "/var/log/auth.log"?

vanthome commented 10 years ago

Teh relevant lines are:

Dec 12 15:18:30 srv1 unix_chkpwd[18563]: check pass; user unknown
Dec 12 15:18:30 srv1 unix_chkpwd[18563]: password check failed for user (root)
Dec 12 15:18:30 srv1 RackApp: /sync1/gitlab: pam_unix(pwauth:auth): authentication failure; logname= uid=1115 euid=1115 tty= ruser= rhost=  user=root

I tried with root and a normal user, both the same.

xaionaro commented 10 years ago

Seems, that something wrong in your "/etc/pam.d/pwauth" file :).

Can you show it?

vanthome commented 10 years ago

I just tried with apache and a different service (phpmyadmin) and it works but failed logins are not even logged in auth.log. Sure, it looks like this:

account    required        pam_localuser.so
auth       required        pam_unix.so
xaionaro commented 10 years ago

Strange/odd [still can't understand the difference between this words :)]...

Can you try this? auth [success=1 default=ignore] pam_unix.so nullok_secure auth required pam_permit.so

If this doesn't help, try this (just for test): auth required pam_permit.so

vanthome commented 10 years ago

:(

Dec 12 16:20:17 srv1 RackApp: /sync1/gitlab: pam_unix(pwauth:auth): check pass; user unknown
Dec 12 16:20:17 srv1 RackApp: /sync1/gitlab: pam_unix(pwauth:auth): authentication failure; logname= uid=1115 euid=1115 tty= ruser= rhost= 
Dec 12 16:20:35 srv1 unix_chkpwd[23597]: check pass; user unknown
Dec 12 16:20:35 srv1 unix_chkpwd[23597]: password check failed for user (xxx)

I think I will dig into this later... seems to be PAM related and nothing Gitlab related.

xaionaro commented 10 years ago

Ok.

If you need any help with PAM, I can try to help, anyway. :)

vanthome commented 10 years ago

ok, big thanks so far!

raphendyr commented 10 years ago

Oh. I totally forgot to check if there is any issues in my fork, sorry for that (apparently github doesn't make me notifications for new issues and I can't find way to enable it).

Did this one get sorted out?

raphendyr commented 10 years ago

@vanthome rpam-ruby19 doesn't work with unix_chkpwd correctly: https://github.com/canweriotnow/rpam-ruby19#featuresproblems

Basically gitlab with pam works in configuration where there is ldap/kerberos authentication done in pam. As that is case in our environment, I haven't had time to think about unix_chkpwd thing. Sorry for that.

As a background, we are department under university. University has AD. We have separate ldap for our users. Most of the users have same username in both systems and their password can be validated using kerberos (because of AD). This allows use to give access to some people only, but still allow them to use same password. We use pam instead of shibboleth because same is done for computers in class rooms.