rancher: Pipelines: Fail to get accesstoken with oauth config

I can’t set up pipelines with Github:

Fail to get accesstoken with oauth config

I tried to remove and re-add Github config. It works fine to authenticate me as a user but not for pipelines.

Selection_999(1229)

Rancher logs aren’t helpful:

2019/04/27 19:16:01 [ERROR] Unknown error: Fail to get accesstoken with oauth config


Useful Info
Versions Rancher v2.2.2 UI: v2.2.41
Route global-admin.clusters.index

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 20 (4 by maintainers)

Most upvoted comments

it happens too on gitlab

Is there any workarround on that for gitlab users?

2020/01/29 10:50:37 [ERROR] Unknown error: Fail to get accesstoken with oauth config

Thanks for the details. Confirmed as a regression bug that can be reproduced in v2.2.3 by following steps:

  1. Enable Github as the global authentication provider.
  2. Go to project pipeline page click Authenticate

The workaround is to click Use another OAuth Application, then input the client ID/secret of your OAuth app explicitly as @RobbinHabermehl suggested.

me too, i look at the source code, may be the field ‘globalConfig.ClientSecret’ in func of testAndApply is not correct, the value is not correct ‘github client secret’ but the name (cattle-global-data:githubconfig-clientsecret) of secret of ‘github client secret’.

Gitlab related issue is different from the original post, I think we should track it in a separate issue: https://github.com/rancher/rancher/issues/25975

Please see the description, cause and possible workaround there.

Same here, tried to setup a pipeline using Gitlab as the version control provider but cannot get Rancher to authenticate. Get “Fail to get accesstoken with oauth config” message. Have tried using different scopes for the application in Gitlab but that has not resolved it. I host rancher behind a reverse proxy with SSL termination.

just tried for gitlab with rancher 2.2.10 and it fails too. verified the payload in the post request on “authenticate” button click and it contains the proper values for appid and secret as I dont use github as auth provider there is no “use another OAuth Application” option. It is already “another” Oauth application as I configure it directly