Connecting

GitLab The OAuth client was deleted - 오류 해결법 본문

GitLab

GitLab The OAuth client was deleted - 오류 해결법

팬도라 2021. 5. 3. 15:37
반응형

운영 중인 GitLab 서버에서 위 그림과 같은 The OAuth client was deleted 에러가 나타나며, 로그인이 진행되지 않는 경우 다음과 같이 해결한다. 

 

문제 원인 

Google OAuth에 등록된 키가 삭제된 경우 발생 

 

해결방법  

Google API Console  -> 접속한다.

API 및 서비스에서 위 그림과 같이 API Key를 생성한다. 

  • Application type - Choose “Web Application”
  • Name - Use the default one or provide your own
  • Authorized JavaScript origins -This isn’t really used by GitLab but go ahead and put https://gitlab.example.com
  • Authorized redirect URIs - Enter your domain name followed by the callback URIs one at a time:
https://gitlab.example.com/users/auth/google_oauth2/callback
https://gitlab.example.com/-/google_api/auth/callback

 

Key 생성이 완료된 경우 다음과 같이 GitLab 서버 설정 파일을 변경한다. 

sudo vi /etc/gitlab/gitlab.rb
#  Initial OmniAuth Configuration for initial settings.

gitlab_rails['omniauth_providers'] = [
  {
    "name" => "google_oauth2",
    "app_id" => "YOUR_APP_ID",
    "app_secret" => "YOUR_APP_SECRET",
    "args" => { "access_type" => "offline", "approval_prompt" => '' }
  }
]


# For installations from source:

- { name: 'google_oauth2',
    app_id: 'YOUR_APP_ID',
    app_secret: 'YOUR_APP_SECRET',
    args: { access_type: 'offline', approval_prompt: '' } }

 

설정을 저장하고, GitLab 서버를 재설정 한다. 

sudo gitlab-ctl reconfigure

'GitLab' 카테고리의 다른 글

GitLab Runner 500 Error 해결방법  (2) 2019.04.22
GItLab 백업 및 복원  (2) 2019.03.19
GitLab CE omnibus 설치  (0) 2019.03.06
Comments