redmine_omniauth_gitlab icon indicating copy to clipboard operation
redmine_omniauth_gitlab copied to clipboard

failed to config it

Open oldunclez opened this issue 6 years ago • 4 comments

Hi applewu

I have installed this plugin , but failed to config it , Even through I filled all the blank ,after "save" it , it keep empty . Beside that , there is no "Login via gitlab" menu on the home page of my redmine

image

image

oldunclez avatar Sep 17 '19 06:09 oldunclez

Redirected to http://192.168.251.60/settings/plugin/redmine_omniauth_gitlab Completed 302 Found in 8ms (ActiveRecord: 2.9ms) Started GET "/settings/plugin/redmine_omniauth_gitlab" for 192.168.30.128 at 2019-09-17 15:01:50 +0800 Processing by SettingsController#plugin as HTML Parameters: {"id"=>"redmine_omniauth_gitlab"} Current user: admin (id=1) Rendered plugins/redmine_omniauth_gitlab/app/views/settings/_gitlab_settings.html.erb (0.2ms) Rendered settings/plugin.html.erb within layouts/admin (1.1ms) Rendered admin/_menu.html.erb (2.4ms) Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.0ms) Rendered plugins/scrum/app/views/scrum_hooks/_head.html.erb (0.2ms) Rendered plugins/progressive_projects_list/app/views/application/_progressive_sidebar.html.erb (0.0ms) Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (0.0ms) Rendered plugins/scrum/app/views/scrum_hooks/_scrum_tips.html.erb (2.4ms) Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms) Rendered layouts/base.html.erb (12.8ms) Completed 200 OK in 21ms (Views: 15.8ms | ActiveRecord: 2.5ms)

oldunclez avatar Sep 17 '19 07:09 oldunclez

Hi applewu, sosgh

From redmine 3.4 or above? this plugin is not storing correct value to database. from my experience the workaround is to store correct value from sql client.

database location is database name: bitnami_redmine table name: settings columnname: name which has a value of "plugin_redmine_omniauth_gitlab"

value column supposed to be following format

--- !ruby/hash:ActionController::Parameters
site: URL
client_id: id
client_secret: secret
allowed_domains: ''
oauth_authentification: 'true'

but following is stored instead

--- 
site: URL
client_id: id
client_secret: secret
allowed_domains: ''
oauth_authentification: 'true'

so all you have to do is add " !ruby/hash:ActionController::Parameters" after "---"

then login via gitlab button will show up.

solidclue avatar Dec 09 '19 09:12 solidclue

@solidclue about which file are you talking about? I am unable to locate it.

On my instance the values are stored somewhere but not in the database.

TBoonX avatar Sep 02 '21 15:09 TBoonX

@TBoonX I (i've lost my old account) wasn't talking about any files here but at the moment when I commented, latest Redmine was 3.4.12 or something close to that version and login via gitlab button do not show up due to that string "!ruby/hash:ActionController::Parameters" missing in settings table with plugin_redmine_omniauth_gitlab column name.

But hey, I've just tested with Redmine verson 4.2.2 stable on bitnami vmware image and it works like a charm.