# Github auth provider kubectl (token) login

**URL:** <https://forums.suse.com/t/github-auth-provider-kubectl-token-login/18717>\
**Category:** SUSE Rancher Prime\
**Created:** [November 2, 2020, 10:10am UTC](https://forums.suse.com/t/github-auth-provider-kubectl-token-login/18717 "2020-11-02T10:10:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jegger](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jegger/32/4686_2.png) [@jegger](https://forums.suse.com/u/jegger)\
**Post date:** [November 2, 2020, 10:10am UTC](https://forums.suse.com/t/github-auth-provider-kubectl-token-login/18717/1 "2020-11-02T10:10:44Z")

</div>

I try to setup a secure authentication against the cluster (via kubectl) with SSO (Github + 2factor, as the provider in my case). However I am not able to start the login flow after I have set a TTL to these tokens as describe here: [https://rancher.com/docs/rancher/v2.5/en/api/api-tokens/](https://rancher.com/docs/rancher/v2.x/en/api/api-tokens/)

What I already figured out is that I may have to supply the --auth-provider argument to the kubeconfig file. To debug this further I directly used the rancher-cli to generate the token for me by issuing the following command:

> rancher token --server [my-rancher.com](http://my-rancher.com) --user some-user – auth-provider github

Executing this command will display the login prompt in the shell (for username and password). I expect that rancher will open a browser window which then will run me trough the github login flow. But this does not happend. It fails with “FATA[0007] error logging in: code: [NotFound] message:[failed to find schema githubs]” if I enter my github credentials in the shell.

I somehow have the feeling that I completely miss the point. Especially strange as I was not able to find anything in your documentation (or googling).

Thanks

---

<div class="post-metadata">

**Author:** ![Dan\_G](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dan_g/32/7674_2.png) [@Dan\_G](https://forums.suse.com/u/Dan_G)\
**Post date:** [June 14, 2021, 4:45pm UTC](https://forums.suse.com/t/github-auth-provider-kubectl-token-login/18717/2 "2021-06-14T16:45:46Z")

</div>

I’m trying to do the same with google oauth. Any luck?
