Https://github.com/login/oauth/access_token: Method Not Allowed

#1

Hello,

I’m trying to configure drone that will sit behind google load balancer.
I did it like this:

  1. configured self signed certificate

  2. starting drone with the self signed certificate

  3. the full docker command:
    docker run --volume=/var/run/docker.sock:/var/run/docker.sock --volume=/var/lib/drone:/data --volume=/etc/drone:/opt/keys --env=DRONE_GITHUB_SERVER=https://github.com --env=DRONE_GITHUB_CLIENT_ID=github_id --env=DRONE_GITHUB_CLIENT_SECRET=github_secret --env=DRONE_AGENTS_ENABLED=true --env=DRONE_RPC_SECRET=rpc_secret --env=DRONE_SERVER_HOST=my_domain.com --env=DRONE_SERVER_PROTO=https --env=DRONE_TLS_AUTOCERT=false --env=DRONE_TLS_CERT=/opt/keys/server.cert --env=DRONE_TLS_KEY=/opt/keys/server.key --env=HTTPS_PROXY=my_domain.com --env=DRONE_DEBUG=true --publish=443:443 --restart=always --detach=true --name=drone drone/drone:1

  4. configured google lb with health check to listen to /healthz

Google lb is working fine. I’m able to go to https://my_domain.com and it shows the Authorize page for our organization.
I click the authorize button, and after some redirects I get the following error:

Login Failed. Post https://github.com/login/oauth/access_token: Method Not Allowed

I have double checked the github id and secret - all is fine. What could it be?

#2

my guess would be an issues with HTTPS_PROXY that you have set. It is the only thing I can see in your configuration that would interfere with outbound http requests to github.