1
votes

I am currently trying to set up Drone.io with my Github account. I installed the drone.io and that works - I am able to get to the drone.io login page on localhost. The problem begins when I try to login to authorize access to Github, as Github returns error 404 - "This is not the page you are looking for" with the following url:

https://github.com/login/oauth/authorize?client_id=%thisIsCorrect&redirect_uri=http%3A%2F%2Flocalhost%2Fauthorize&response_type=code&scope=repo+repo%3Astatus+user%3Aemail+read%3Aorg&state=drone

I tried using localhost and localhost/authorize for the Authorization Callback, but no changes. Can anyone see what am I doing incorrectly?

My Github settings:

enter image description here

My docker-compose file:

enter image description here

1

1 Answers

3
votes

It looks like your authorization callback url is invalid. Instead of http://localhost it should be http://localhost/authorize per the official setup instructions.

Register your application with GitHub to create your client id and secret. It is very import the authorization callback URL matches your http(s) scheme and hostname exactly with /authorize as the path.

Reference documentation: http://readme.drone.io/admin/setup-github/

In addition it also looks like the environment section is malformed. The environment variables in the docker-compose section should not be quoted. Docker compose does not unquote values when declared in key=value format.

So instead of quoting values like this:

environment:
  - foo='bar'
  - baz=qux

You should remove the quotes:

environment:
  - foo=bar
  - baz=qux

Or if you need to quote values you should use a map instead or an array in key=value format.

environment:
  foo: "bar"
  baz: qux

Reference docker compose documentation: https://docs.docker.com/compose/compose-file/#/environment