Unable to setup Github Auth using Dex #12307
-
Hi everyone, I am looking for some help for GitHub Auth setup in ArgoCD. I have read multiple documents and posts so far but still not able to figure out what I have done wrong. Please see below error logs, configuration settings. I have setup helm chart for argocd and updated dex.config in values.yaml as below: # Dex configuration
dex.config: |
connectors:
# GitHub
- type: github
id: github
name: GitHub
config:
clientID: $dex-secret:dex.github.clientID
clientSecret: $dex-secret:dex.github.clientSecret
orgs:
- name: testorg Created github app and used those clientid and client secret as a secret. apiVersion: v1
data:
clientID: <clientid in base64>
clientSecret: <client secret in base64>
kind: Secret
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/instance: argocd
app.kubernetes.io/name: dex-secret
app.kubernetes.io/part-of: argocd
name: dex-secret
namespace: argocd
type: Opaque Values set in GitHub Auth App: http://testdomain.testing.com/argocd Authorization callback URL http://testdomain.testing.com/argocd/api/dex/callback I am able to access ArgoCD at: http://testdomain.testing.com/argocd
I am also not sure why I keep getting these:
Any help in this issue is greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
hi @GauJosh |
Beta Was this translation helpful? Give feedback.
-
I ran into this as well if the secret lacked the label: |
Beta Was this translation helpful? Give feedback.
-
Hi @GauJosh , I saw in your code, you authorisation URL has a I am having some trouble with the prefix thing. I have configured the 'rootpath' argument for the argocd server and updated my Ingress. I can access my Argo CD login page with the prefix. But the login button generated an authorisation URL without the prefix. Could you give me some tips about how you configured the prefix? Thanks 🙏 |
Beta Was this translation helpful? Give feedback.
hi @GauJosh
Maybe the issue is that you are referencing
dex.github.clientID
but in the actual secret the ID is just located underclientID
in the data sectionCould you try just setting it as
$dex-secret:clientID
and$dex-secret:clientSecret
?