After a bit of struggle I got Gitorious up and running on Ubuntu 14.04
(tweaking the installation scripts and puppet rules). I am using LDAP
authentication. After I added a team (containing a single LDAP group as
member), I get a 500 Internal Server error every time I go to the Teams page.
Can anyone help me debug it? I am not a Ruby programmer, but I don't mind
learning it.
The log contains this error, whenever I go to the Teams page:
ActionView::Template::Error (undefined method `gsub' for nil:NilClass):
26: <h2>
27: <%= link_to h(group.name), group_path(group.to_param) %>
28: </h2>
29: <%= pluralize group.members.count,
t("views.groups.member_singular"), t("views.groups.member_plural") %>,
30: <%= pluralize group.repositories.count,
t("views.groups.repo_singular"), t("views.groups.repo_plural") %>
31: </div>
32: </li>
lib/gitorious/authentication/ldap_configurator.rb:97:in `transform_username'
app/models/ldap_group.rb:217:in `block in members'
app/models/ldap_group.rb:211:in `map'
app/models/ldap_group.rb:211:in `members'
app/views/groups/_group.html.erb:29:in
`_app_views_groups__group_html_erb__4205605679357806323_42334580'
app/views/groups/index.html.erb:28:in
`_app_views_groups_index_html_erb___3653603409685073624_41051880'
app/controllers/groups_controller.rb:34:in `index'
app/middlewares/dolt_cache_middleware.rb:24:in `call'
app/middlewares/dolt_auth_middleware.rb:26:in `call'
This is the content of a/m/dolt_auth_middleware.rb
18 require "gitorious/app"
19
20 class DoltAuthMiddleware
21 def initialize(app)
22 @app = app
23 end
24
25 def call(env)
26 result = @app.call(env)
27 if !env["dolt"]
28 log "Not inside Dolt"
29 return result
30 end
31 repo = env["dolt"][:repository]
32 request = Rack::Request.new(env)
33 user_id = request.session["user_id"]
34 user = user_id ? User.find(user_id) : nil
The team that I added doesn't show up in my Active Teams list either.
My authorization.yml is:
disable_default: true
enable_openid: false
methods:
- adapter: Gitorious::Authentication::LDAPAuthentication
host: ldap.fq.dn
base_dn: OU=People,DC=fq,DC=dn
group_search_dn: OU=Groups,DC=fq,DC=dn
login_attribute: uid
attribute_mapping:
givenName: fullname
mail: email
encryption: none
bind_user:
username: cn=admin,dc=fq,dc=dn
password: password
members_attribute_name: memberUid
Once I get all this fixed, I plan to clean up the modification made in the
installation script and puppet rules and contribute them here.
--
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.