无法在GitLab CE

时间:2015-11-13 23:15:41

标签: gitlab gitlab-omnibus

我在使用GitLab安装启用Google身份验证时出现问题。我跟着this guide添加了启用Google身份验证(界面发生了一些变化,但我能够通过联系人和我的域名的Google+ api访问权限生成我需要的令牌)。当我转到我的GitLab登录URL时,没有提供者出现。我也启用了Omniauth。这是我的Gitlab.rb中的相关片段:

gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = false
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
        {
        "name" => "google_oauth2",
        "app_id" => "not-showing",
        "app_secret" => "not-showing",
        "args" => { "access_type" => "offline", "approval_prompt" => '' }
        }
]

然而,我倾向于认为这是Omniauth本身的一个问题,因为在我的GitLab管理仪表板中,它没有显示旁边的绿色“on”图标: Gitlab Admin Dashboard

我在Ubuntu 14.04上运行服务器。

对此的任何见解将不胜感激。

2 个答案:

答案 0 :(得分:3)

进行这些更改后,您需要重新配置并重新启动gitlab。

sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart

答案 1 :(得分:3)

更改此行:

...
gitlab_rails['omniauth_allow_single_sign_on'] = ['google_oauth2']
...

然后运行:

sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
相关问题