Unable to auth through github

Hello. I am getting this error when trying to authenticate through a github app, whether published or not:
2017-06-12T08:50:22.240876853Z time="2017-06-12T08:50:22Z" level=error msg="cannot authenticate user. GET https://api.github.com/user/emails: 404 Not Found []"
I have tried versions 0.7, 0.7.1 and latest.

version: '2'

services:
  drone-server:
    image: drone/drone:0.7
    ports:
      - 443:443
    volumes:
      - /var/lib/drone:/var/lib/drone/
    restart: always
    environment:
      - DRONE_OPEN=true
      - DRONE_HOST=https://<HOST>
      - DRONE_GITHUB=true
      - DRONE_GITHUB_CLIENT=<CLIENT>
      - DRONE_GITHUB_SECRET=<SECRET>
      - DRONE_SECRET=secret
      - DRONE_GITHUB_PRIVATE_MODE=false
      - DRONE_LETS_ENCRYPT=true

  drone-agent:
    image: drone/drone:0.7
    command: agent
    restart: always
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=ws://drone-server:8000/ws/broker
      - DRONE_SECRET=secret

I can see the following API call failed:

https://api.github.com/user/emails

This API all is used to fetch the individual email addresses for the user attempting to login. In this case the error indicates that github could not find any associated email addresses, and therefore returned a 404.

Note that you cannot login to Drone if the above GitHub API call does not return a verified, primary email address.

I believe my github account has an email address somewhere in it. Do you think that it should be enabled somewhere in your account to expose your email to OAuth apps? If this is true then I think that this error should be exposed to drone user.

I have selected my only email as a public one here and am still getting the error:

The email endpoint (https://api.github.com/user/emails) returns emails that are managed at the following account settings screen in github: https://github.com/settings/emails

If the API call is not returning a valid email list, and is instead returning a 404, please contact GitHub support. I am not able to help troubleshoot the results of their API endpoints.

Actually the problem was that I have registered a Github application instead of an OAuth application.

1 Like