From 190478a5a7331b83d07c1caa85a3341a91637d1f Mon Sep 17 00:00:00 2001 From: DoppioJP Date: Tue, 14 Aug 2012 18:03:41 +0200 Subject: [PATCH] GitHub authentication when served on Heroku --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+), 0 deletions(-) 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