For some reason, I’m unable to authenticate against GitHub. Every time I try, I see the following error in my logs:
cannot authenticate user. GET https://api.github.com/user: 401 Bad credentials []
My setup is as follows:
I’m using Google Kubernetes Engine using this helm chart: https://github.com/helm/charts/tree/master/stable/drone
I’ve customised the chart with the following values to give me TLS and to work with my GitHub oauth app:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "gce"
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.allow-http: "false"
hosts:
- ci.orgname.io
tls:
- secretName: drone-tls
hosts:
- ci.orgname.io
server:
host: "https://ci.orgname.io"
env:
DRONE_ADMIN: "yoitsro"
DRONE_GITHUB_CLIENT: "ACTUAL CLIENT ID"
DRONE_GITHUB_SECRET: "${DRONE_GITHUB_SECRET}"
DRONE_GITHUB: "true"
DRONE_OPEN: "true"
DRONE_ORGS: "orgname"
DRONE_PROVIDER: "github"
envSecrets:
- DRONE_GITHUB_SECRET
service:
httpPort: 80
nodePort: 32015
type: NodePort
persistence:
storageClass: "ssd"
I’ve tried using the same oauth app against drone running in a local docker-compose setup and everything works as expected. This problem only seems to exhibit itself when running Drone on Kubernetes on GKE.
Any ideas?