diff --git a/README.md b/README.md index 7081131..0a3a153 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,43 @@ You can change the requested account permissions by setting `github_access_scope +### GitHub authentication when served on Heroku + +You will need to set up Heroku variables accordingly as described in [Configuring GitHub authentication](#configuring-github-authentication): + +* GITHUB_AUTHENTICATION + +```bash +heroku config:add GITHUB_AUTHENTICATION=true +``` + +* GITHUB_CLIENT_ID + +```bash +heroku config:add GITHUB_CLIENT_ID=the_client_id_provided_by_GitHub +``` + +* GITHUB_SECRET + +```bash +heroku config:add GITHUB_SECRET=the_secret_provided_by_GitHub +``` + +* GITHUB_ACCESS_SCOPE - set only one scope `repo` or `public_repo`. If you really need to put more than one, separate them with comma. + +```bash +heroku config:add GITHUB_ACCESS_SCOPE=repo,public_repo +``` + +__Note__: To avoid restarting your Heroku app 4 times you can set Heroku variables in a single command, i.e: + +```bash +heroku config:add GITHUB_AUTHENTICATION=true \ +GITHUB_CLIENT_ID=the_client_id_provided_by_GitHub \ +GITHUB_SECRET=the_secret_provided_by_GitHub \ +GITHUB_ACCESS_SCOPE=repo,public_repo +``` + ### Configuring LDAP authentication: * In `config/config.yml`, set `user_has_username` to `true` -- libgit2 0.21.2