Go to https://github.com/settings/developers, then look for OAuth Apps in the left menu. Select New OAuth App. Fill in the required fields.
Be sure to set the Callback URL to use the path
/auth/github/callbackat your site domain. e.g.,
(Optional) Upload a logo that users will see when signing into GitHub from your site.
After creating your application, you should see the Client ID and Client Secret. Enter those in the Discourse fields: